Uncaught SyntaxError: Unexpected token ILLEGAL on javascript objects -


i trying create object in javascript has object inside of , getting following error:

uncaught syntaxerror: unexpected token illegal 

this code

var motivateen = {     0 : {0: "{name}, keep studying lesson better score.", 1: "bad luck {name}, keep studying lesson improve. "},     50:{0: "practice makes perfect {name}, try lesson again.",1:"not bad, better luck next time {name}!",2:"well done {name}, you’re on right track!"},     85:{0:"congratulations {name}, lesson complete!",1:"woohoo, lesson complete {name}!",2:"awesome stuff {name}! keep up!",3:"great skills! done {name}! "},     100:{0: "perfect {name}! keep work!",1:"congratulations {name}, got perfect score!"}  }; 

if take code , format it, error more obvious:

var motivateen = {     0: {         0: "{name}, keep studying lesson better score.",         1: "bad luck {name}, keep studying lesson improve.         "}, ... 

you can't use newline in middle of string


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -