0

Why there are no other data types in java script other than var??

25th Oct 2017, 4:18 PM
Emisha
Emisha - avatar
4 Antworten
+ 3
read this : https://www.sololearn.com/learn/315/?ref=app *EDIT : read the comment also .
25th Oct 2017, 4:37 PM
RZK 022
RZK 022 - avatar
+ 3
JavaScript is a lose-typed language, as such, there's no definite data type, you can assign a numerical data to a variable and later assign string, array, object or anything into it and JavaScript doesn't complain about it, this is just my personal opinion, with JavaScript evolving fast as it is, I may have skipped something though. Hth, cmiiw
25th Oct 2017, 6:43 PM
Ipang
+ 1
var is known as hoisted data-type but there is even the "let" keyword , which is non-hoisted data-type.
25th Oct 2017, 4:28 PM
RZK 022
RZK 022 - avatar
0
what do u mean by hoisted?
25th Oct 2017, 4:29 PM
Emisha
Emisha - avatar