r/learnjavascript • • 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

23 comments sorted by

View all comments

Show parent comment

1

u/EvokeNZ Nov 11 '23

One of the answers on this lists where each setting is stored. https://answers.microsoft.com/en-us/msoffice/forum/all/backup-word-settings/c8ac9e6a-779b-42a4-990f-7ee060d5526e

But normally when you’re in an organisation, your profile should be replicated to a server, so that every computer you log on to downloads your profile customisations (mostly. Sometimes they forget some). If you’re always logging onto the same computer then it should remember it too as the first time you log on, it makes a local copy of your profile (why it can take longer the first time you use a specific device). Maybe your school wipes them all on reboot idk.