unexpected identifier | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

unexpected identifier

I was trying to print out 0-9 using a for loop but am getting an unexpected identifier error... I don't know why... console.log ("hello world!!"); var num=9; console.log (++num); for (var i = 0; i < 10; i++) { console.log(i); }

16th Mar 2022, 8:08 PM
Crystäl Ëne
Crystäl Ëne - avatar
5 Answers
+ 3
Check again.. It works fine.. If not share your code link..
16th Mar 2022, 8:12 PM
Jayakrishna 🇮🇳
+ 1
Check out this...... I've fixed some codes https://code.sololearn.com/Wa7RAWBWGT3g/?ref=app
17th Mar 2022, 4:10 PM
Shailendra Maurya
0
I didn't write the code on sololearn But I'll send it though
17th Mar 2022, 6:49 AM
Crystäl Ëne
Crystäl Ëne - avatar
0
I wrote it on Code Editor
17th Mar 2022, 6:51 AM
Crystäl Ëne
Crystäl Ëne - avatar
0
Above code working fine. May you have any syntax error or anything missing tokens from the above.. Look at closely again...
17th Mar 2022, 11:28 AM
Jayakrishna 🇮🇳