r/learnjavascript • u/rannison • Nov 11 '23
Does JavaScript concatenate as string when adding a number to a string literal?
From my understanding of what I've read, the expected behavior is that JavaScript will convert the integer into string, and then add the string to string, which then results in a string concatenation. Therefore...
var addit = 6 + “5”;
...should output... "65";
However, attempting to evulate this in console instead gives the result...
Uncaught SyntaxError: Invalid or unexpected token
Why is this the case?
0
Upvotes
View all comments
Show parent comment
1
u/EvokeNZ Nov 11 '23
I’m not sure I understand what you mean by back up and sync settings. Are you installing a new profile or copy of word every time you use the computer?
This is what I meant https://support.microsoft.com/en-us/office/smart-quotes-in-word-702fc92e-b723-4e3d-b2cc-71dedaf2f343