Home > Web Front-end > JS Tutorial > What are the two categories of JavaScript data types?

What are the two categories of JavaScript data types?

王林
Release: 2020-05-26 17:57:12
Original
4654 people have browsed it

What are the two categories of JavaScript data types?

Javascript data types are divided into:

Value types (basic types): String, Number, Boolean ( Boolean), Null, Undefined, Symbol.

Reference data types: Object, Array, Function.

Dynamic typing:

JavaScript has dynamic typing. This means that the same variable can be used as different types.

Example:

What are the two categories of JavaScript data types?

The result shows:

What are the two categories of JavaScript data types?

Three ways to declare arrays :

What are the two categories of JavaScript data types?

Two addressing modes for object properties:

Example:

What are the two categories of JavaScript data types?

Output:

What are the two categories of JavaScript data types?

Recommended tutorial: js introductory tutorial

The above is the detailed content of What are the two categories of JavaScript data types?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template