+ 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 odpowiedzi
+ 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"