- 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
Why JavaScript Data Types are Dynamic?
JavaScript also has dynamic types. That would mean the same variable used for holding different data types in JavaScript.
Example
<html> <head> <script> var val; val = "Amit"; document.write("String: "+val); val = 20; document.write("<br>Number: "+val); val = 40.90; document.write("<br>Number with decimals: "+val); </script> </head> <body> </body> </html>
Advertisements