+ 10
Are Const and lets no longer needed in JavaScript đ€đ€đđ??
Now look at this code https://code.sololearn.com/WrPe4P8H9s91/?ref=app I tried it on browser as well and it worked fineđ... But why?? đ And is this the end of using 'const's and 'let's đ just like pythonđ€?? What you guys think of it?? đ€đ
5 Respostas
+ 9
Not the case, it seems you misunderstood it.
If you don't use declaration keywords then it will make that variable global scoped variable(not recommended at all)
https://code.sololearn.com/WWFa8Sti92Sn/?ref=app
+ 6
Steve Sajeev thanks for suggestion
I added the open ended tag ( I've seen mods doing sođ
đ
)
+ 4
Var let and const are used to define variables. What you are using are undefined variables. The problem with that is if you make a typo, there will be a whole new variable in the code to deal with...
https://code.sololearn.com/WfIjWr5gEzOQ/?ref=app
+ 2
Ok Raj Chhatrala , sorry...
+ 2
Java script has so much options so much possibilities that's why I love itđ
I declare a variable like this most of the timeđ
name="atomic wave"