---
title: "从头开始学JavaScript（第二天）"
author: "magnesium"
date: "2009-01-14T23:16:40Z"
tags: []
slug: "javascript"
draft: false
lastmod: "2009-01-15T00:11:29Z"
id: 316526
url: "https://magnesium.iteye.com/blog/316526"
---

今天是第二天，我们来看看学了点什么。

1.JavaScript有3种基本数据类型：1）number    2）boolean     3）text

2.alert boxes only display text, not numbers. So numbers are converted to text  

  behind the scenes before they’re displayed

3.var

4.标识符规则：1）An identifier must be at least one character in length

              2)The first character in an identifier must be a letter, an
                underscore (_), or a dollar sign ($).

              3）Each character after the first character can be a letter,
                 an underscore (_), a dollar sign ($), or a number.

              4）Spaces and special characters other than _ and $ are
                 not allowed in any part of an identifier.

5.变量名规则：1）数字的变量名全部大写

              2）其余都用low-camel方式

6.NaN

7.parseInt() and parseFloat()

8.IE 不支持const关键字

-----------------108------------------