Does it matter if a space before the quote(s) is placed before or after a string when you want to get a space between the strings?
Spaces inside the quotes will render with the string.
variable = "more text" "Some text, " + variable
will render as
Some text, more text
Console. Log (‘code ‘) + (‘me-up’)//should return code me-up//
Console.log (‘code’) + (‘ me-up’)//will return the same string results also code me-up//
Everything should be inside the parentheses.
console.log('code ' + 'me up');
Note there are no uppercase letters in
As with most languages, yes, syntax is the foundation of code that can be interpreted. We’re nowadays less focused on good grammar and spelling in our day to day communication, but in programming there is no such laxness permitted if we wish to get the result we planned for.
It doesn’t look like it. I had the same thought, so tested both scenarios, both rendered the expected Hello World. The replies below are all about keeping things bounded by the brackets, rather than directly answering your question. If there’s someone out there with more experience/ knowledge as to why it matters where you add the space, please let us know? Thanks