0
Class/var
Hello Why take var with JavaScript and not class ? Class is more easy no? Thank
5 Respostas
+ 5
Hello, 😊
Can you specifying your question correctly!
Use the search bar!
https://www.sololearn.com/post/10362/?ref=app
Please, read our guidelines:
https://www.sololearn.com/discuss/1316935/?ref=app
An useful code for any new user here!;)
https://code.sololearn.com/WvG0MJq2dQ6y/
+ 2
A class is meant to tie data and function together, and normally several values of data and several functions.
I doesn't make sense to create a class for only one value and I also don't see how it can be easier than writing "var x=5".
Unless... we're not talking about the same thing.
Share your code?
+ 1
I still have no code I have just seen the Var and I cofounded but it is more clear now thank you
0
Classes and variables are not the same thing.
0
wa can have any class with the same value and change it in javascript àd do the same thing with var...