Please run my code see if it works! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Please run my code see if it works!

Someone said syntax error, but it works when I run on my device, want to be sure. NB: Entering just numbers won't display anything, I intentionally curbed that cos' numbers can't be a name. Apart from that, alphabets mixed numbers will work or don't enter anything at all. https://code.sololearn.com/WsqUn2N78wkY/?ref=app

21st Apr 2017, 1:54 PM
Benneth Yankey
Benneth Yankey - avatar
11 Answers
+ 18
@Janez U are not limited to use only one id, u can use multiple id's but each of dem must be have a different name.
21st Apr 2017, 6:44 PM
Ghaffaru Mudashiru
Ghaffaru Mudashiru - avatar
+ 12
It give me a syntax error... ______________________________ Uncaught Syntax Error: Unexpected token ) Line 18 ______________________________
21st Apr 2017, 2:32 PM
Maz
Maz - avatar
+ 5
works for me
21st Apr 2017, 1:58 PM
jay
jay - avatar
+ 3
thanks @jay
21st Apr 2017, 2:12 PM
Benneth Yankey
Benneth Yankey - avatar
+ 2
I am not sure why it doesn't work for some of you. @Trag, 'Let' is ES6 block scope variable declaration to replace 'var'.
22nd Apr 2017, 7:59 PM
Benneth Yankey
Benneth Yankey - avatar
+ 1
Ok Ben it works on mine SAMSUNG GALAXY NOTE 3
21st Apr 2017, 2:55 PM
Keron Forbes
+ 1
Work, but 2 questions : why are you coding between <script> while you can type directly in javascript section and what the hell is "let"?
21st Apr 2017, 8:11 PM
Trag Roca
Trag Roca - avatar
+ 1
@Abdul thank you
21st Apr 2017, 8:24 PM
Janez Brenčič
Janez Brenčič - avatar
+ 1
cool.. it works
22nd Apr 2017, 10:27 PM
Wakaye 1
Wakaye 1 - avatar
0
I dont know javascript yet but in html isnt that you can use only 1 ID?
21st Apr 2017, 2:39 PM
Janez Brenčič
Janez Brenčič - avatar
0
syntax error
21st Apr 2017, 7:18 PM
pradhuman shrestha
pradhuman shrestha - avatar