千鋒web前端開發(fā)項目教程_1000集完全零基礎(chǔ)入門HTML5+CSS3+JS到

數(shù)據(jù)類型
? ? 整形:沒有小數(shù)點的數(shù)字
? ? console.log(123)
? ? 浮點型:有小數(shù)點的數(shù)字
? ? console.log(3.1415926)
? ? console.log(3.1415926+12)
? ? console.log(0.1+0.2)
? ? console.log(10+123)
? ? 字符串類型 String
? ? 被雙引號或者單引號括起來的字符序列
? ? console.log("李逵");
? ? console.log('黑旋風(fēng)');
? ? console.log("10"+"101");(拼接)
? ? 布爾值 Boolean true/false(判斷對錯)
? ? var a = 1>2;
? ? console.log(a);
? ? var x = 6>2;
? ? console.log(x);
? ? 變量定義但未賦值 undefined
? ? var a;
? ? console.log(a);
? ? ?null該變量的值為空,和undefined意義類似
? ? ?var a = null;
標(biāo)簽: