- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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>
- Related Articles
- What are dynamic data types in C#?
- How to define dynamic data types in C#
- What are JavaScript data types and data structures?
- What are primitive data types in JavaScript?
- What are Complex Data types in JavaScript?
- What are the types of Dynamic Branch Prediction?
- Dynamic Programming: return all matched data in JavaScript
- Why are there separate tuple and list data types in Python?
- What are Primitive and Non-Primitive Data Types in JavaScript?
- What are the differences between JavaScript Primitive Data Types and Objects?
- What is Dynamic Testing? (Types, Techniques, Example)
- What are different Perl Data Types?
- What are the data types, value types and reference types in C#?
- Which data types are immutable in Python?
- What are pointer data types in C#?

Advertisements