Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Which data is stored in var and how its content is changed in JavaScript?
JavaScript variables are not typed but their values do have a type. The same variable can be assigned new values.
Example
<!DOCTYPE html> <html> <body> <script> var a; document.write(typeof a+"\r
"); a = true; document.write(typeof a+"\r
"); a = 5; document.write(typeof a+"\r
"); a = "web"; document.write(typeof a+"\r
"); </script> </body> </html>
Advertisements
