![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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