+ 2
Under Data-types in JavaScript...
...specifically in Floating Point Numbers, the Try It Yourself part has a Variable called price, with the value being 55.55, so just for kicks and grins, I decided to put a $ in front of it because it said it was allowed. It said that in naming the variables, you could use a letter,_an_underscore_, or a $ dollar $ign. I am sure you can already tell that I am going to say it didn't work. And it didn't work. Why? What happened?
6 Respuestas
+ 1
You mean you tried to name a variable $55.55? That almost works, but dots can't be part of a variable name.
So javascript saw $55 and .55 after it and got confused!
0
the variable can have a dollar sign in front. so $price=55.55 would have been fine. but the value assigned to the variable can't have the dollar sign unless you make it a string type.
0
Hello guys can anyone pls tell me how to bypass capchas
0
Hi please I need a coach
0
Hi 👋 I need a coach
- 2
Hello guys can anyone tell me how to get links from js