Would this code work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Would this code work?

I was wondering if this simple JS code would work. SoloLearn gives a useful chart list of the names you can't assign to a variable. For instance: var byte = "Hello Galaxy!"; document.write(byte); Would not work. Byte is a name you can't name a variable. But would this work?: var bytes = "Hello Galaxy 2"; document.write(bytes); Since bytes is different from byte, would it work? I know it gives the same meaning, but would the plural work? Or maybe 'abstractclass'?

11th Mar 2018, 6:45 PM
Kathryn Swan
Kathryn Swan - avatar
3 Answers
+ 13
Both would work.
11th Mar 2018, 6:49 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
I tryied it, both of them works =)
11th Mar 2018, 10:38 PM
Nobody
+ 1
Cristallya ♥ Valen.H. ~ thank you both!
1st May 2018, 8:52 PM
Kathryn Swan
Kathryn Swan - avatar