码迷,mamicode.com
首页 > 编程语言 > 详细

JavaScript data types and data structures

时间:2019-09-26 16:08:51      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:invalid   cts   AMM   integer   seve   general   automatic   argument   stand   

JavaScript data types and data structures

Programming languages all have built-in data structures, but these often differ from one language to another.

This article attempts to list the built-in data structures available in JavaScript and what properties they have;these can be used to build other data structures.

Wherever possible, comparisons with other languages are drawn.

Dynamic typing

JavaScript is a loosely typed or a dynamic language.

Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types:

var foo = 42;    // foo is now a number
foo     = ‘bar‘; // foo is now a string
foo     = true;  // foo is now a boolean

Data types

The latest ECMAScript standard defines eight data types:

 

 

 

 

 

 

 

 

 

JavaScript data types and data structures

标签:invalid   cts   AMM   integer   seve   general   automatic   argument   stand   

原文地址:https://www.cnblogs.com/chucklu/p/11592310.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!