Your question is unclear. As the value that it gets evaluated is purely dependent on
partElements['awesometimes']['color'] ( I assume partElements is JavaScript array )
Also, it would result in syntax error as the concatenation done is incorrect. Moreover, the concatenation should be done part of JavaScript. Your HTML code cannot do it. If you are trying to do it in HTML, it will never work.
Below code might help you out.
<script type="text/JavaScript">
window.onload=function(){
document.getElementById('myImg').src = "james" + "bond" + ".jpg";
}
</script>
<img src="" id="myImg">
Let the JavaScript do its concatenating business. Let HTML do its rendering business.
If you are finding tough time in what that gets evaluated to, start using debugging tools.
All the major browsers provide these features.
Chrome debugging tools are good.
References : https://developers.google.com/chrome-developer-tools/docs/javascript-debugging
Try evaluating the string concatenation of img src in chrome console to get to know it.
"/path/frontend/bigpath/default/images/heyhey/coolguy/' + partElements['awesometimes']['color'] + '.png". Please provide more context."cannot end with a'<img. The quotation marks wouldn't cause a syntax error at all. As you can see at the end, there is a closing", so the'are inside of the double quoted string. In JS,"foo'bar'"is a valid string.console.log(partElements['awesometimes']['color'])?. that will be your image name. Provide some more code to answer your query.