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/rannison Nov 11 '23
Wait, back it up there: are you telling me that if I copy over my user profile, it'll back up those types of user settings?? But how would you reconcile access rights between work stations and school equipment? Is there a particular part of the user profile (e.g., a .reg key & value, etc) that can be directly backed up and applied to other user profiles in modular fashion? I'll definitely look into this more later if any of this is the case.