I'm not sure i'm going bonkers or something. I just can't get my head around this. I'm currently studying Python, PHP and Javascript and I'm not sure if I mix the syntaxes or anything. Anyhow, I'm going to have a function that adds a string to a phrase. My string is 'grey' and the end result should be 'My favorite color is grey' So the code should be like 'My favorite color is' + 'grey'. The code I have so far is:
function stringPhrase(); {
document.write ("grey");
}
var result = ("My favorite color is" + stringPhrase());
Am I anyway near the correct syntax or am I heading in the wrong direction? Thanks a plenty. Regards, Thomas
document.write()with something else. What's written, is already written.