App下載

詞條

大約有 4,000 項符合查詢結(jié)果 ,庫內(nèi)數(shù)據(jù)總量為 78,250 項。(搜索耗時:0.0069秒)

1211.ES6 函數(shù)的擴展

...接為函數(shù)的參數(shù)指定默認值,只能采用變通的方法。 ```javascript function log(x, y) { y = y || 'World'; console.log(x, y); } log('Hello') // Hello World log('Hello', 'China') // Hello China log('Hello', '') // Hello World ``` 上面代碼檢查函數(shù) log 的參數(shù) y 有沒有...

http://www.o2fo.com/escript6/escript6-sxp237ez.html

1212.ES6 字符串的新增方法

...符`,但是這個方法不能識別碼點大于 0xFFFF 的字符。 ```javascript String.fromCharCode(0x20BB7) // "?" ``` 上面代碼中, String.fromCharCode() 不能識別大于 0xFFFF 的碼點,所以 0x20BB7 就發(fā)生了溢出,最高位 2 被舍棄了,最后返回碼點 U+0BB7 對應...

http://www.o2fo.com/escript6/escript6-hwpn37ew.html

1213.數(shù)字(Numbers)

JavaScript中的所有數(shù)字都是浮點型(雖然大部分的JavaScript引擎內(nèi)部也使用整數(shù))。至于為什么這樣設(shè)計,查看這里([每一個JavaScript開發(fā)者應該了解的浮點知識](http://yanhaijing.com/javascript/2014/03/14/what-every-javascript-developer-should-know-ab...

http://www.o2fo.com/wplzg/wplzg-limj25iu.html

1214.ES6 Class 的基本語法

## 1. 簡介 ### 類的由來 JavaScript 語言中,生成實例對象的傳統(tǒng)方法是通過`構(gòu)造函數(shù)`。下面是一個例子。 ```javascript function Point(x, y) { this.x = x; this.y = y; } Point.prototype.toString = function () { return '(' + this.x + ', ' + this.y + ')'; }; var p = new P...

http://www.o2fo.com/escript6/escript6-qwg737fd.html

1215.JSON 使用

...裝成JSON格式,傳到前臺頁面之后,需要將JSON格式轉(zhuǎn)換為JavaScript對象,然后在網(wǎng)頁中使用該數(shù)據(jù)。 把 JSON 文本轉(zhuǎn)換為 JavaScript 對象 JSON 最常見的用法之一,是從 web 服務器上讀取 JSON 數(shù)據(jù)(作為文件或作為 HttpRequest),將 JSON ...

http://www.o2fo.com/json/json-eval.html

1216.32. 翻譯

This style guide is also available in other languages: armoucar/javascript-style-guide borislavvv/javascript fpmweb/javascript-style-guide jigsawye/javascript yuche/javascript nmussy/javascript-style-guide timofurrer/javascript-style-guide sinkswim/javascript-style-guide mitsuruog/javacript-style-g...

http://www.o2fo.com/rtuhtw/a5bdmozt.html

1217.ES6 簡介

##ES6 簡介## ECMAScript 6.0(以下簡稱 `ES6`)是 JavaScript 語言的下一代標準,已經(jīng)在 2015 年 6 月正式發(fā)布了。它的目標,是使得 JavaScript 語言可以用來編寫復雜的大型應用程序,成為企業(yè)級開發(fā)語言。 ##ECMAScript 和 JavaScript 的關(guān)系 ...

http://www.o2fo.com/escript6/escript6-827l37er.html

1218.Decorator

...的功能。 ## 1. 類的裝飾 裝飾器可以用來裝飾整個類。 ```javascript @testable class MyTestableClass { // ... } function testable(target) { target.isTestable = true; } MyTestableClass.isTestable // true ``` 上面代碼中,`@testable` 就是一個裝飾器。它修改了 `MyTestab...

http://www.o2fo.com/escript6/escript6-3fz737fq.html

1219.ES6 編程風格

...代 `var` ,因為兩者語義相同,而且` let `沒有副作用。 ```javascript 'use strict'; if (true) { let x = 'hello'; } for (let i = 0; i < 10; i++) { console.log(i); } ``` 上面代碼如果用 var 替代 let ,實際上就聲明了兩個全局變量,這顯然不是本意。變量...

http://www.o2fo.com/escript6/escript6-mjlf37fk.html

1220.ES6 Set 與 Map 數(shù)據(jù)結(jié)構(gòu)

... Set 本身是一個`構(gòu)造函數(shù)`,用來生成 Set 數(shù)據(jù)結(jié)構(gòu)。 ```javascript const s = new Set(); [2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); for (let i of s) { console.log(i); } // 2 3 5 4 ``` 上面代碼通過 add() 方法向 Set 結(jié)構(gòu)加入成員,結(jié)果表明 Set 結(jié)構(gòu)不會添...

http://www.o2fo.com/escript6/escript6-lx3y37f4.html

抱歉,暫時沒有相關(guān)的微課

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的視頻課程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的教程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

1211.ES6 函數(shù)的擴展

...接為函數(shù)的參數(shù)指定默認值,只能采用變通的方法。 ```javascript function log(x, y) { y = y || 'World'; console.log(x, y); } log('Hello') // Hello World log('Hello', 'China') // Hello China log('Hello', '') // Hello World ``` 上面代碼檢查函數(shù) log 的參數(shù) y 有沒有...

http://www.o2fo.com/escript6/escript6-sxp237ez.html

1212.ES6 字符串的新增方法

...符`,但是這個方法不能識別碼點大于 0xFFFF 的字符。 ```javascript String.fromCharCode(0x20BB7) // "?" ``` 上面代碼中, String.fromCharCode() 不能識別大于 0xFFFF 的碼點,所以 0x20BB7 就發(fā)生了溢出,最高位 2 被舍棄了,最后返回碼點 U+0BB7 對應...

http://www.o2fo.com/escript6/escript6-hwpn37ew.html

1213.數(shù)字(Numbers)

JavaScript中的所有數(shù)字都是浮點型(雖然大部分的JavaScript引擎內(nèi)部也使用整數(shù))。至于為什么這樣設(shè)計,查看這里([每一個JavaScript開發(fā)者應該了解的浮點知識](http://yanhaijing.com/javascript/2014/03/14/what-every-javascript-developer-should-know-ab...

http://www.o2fo.com/wplzg/wplzg-limj25iu.html

1214.ES6 Class 的基本語法

## 1. 簡介 ### 類的由來 JavaScript 語言中,生成實例對象的傳統(tǒng)方法是通過`構(gòu)造函數(shù)`。下面是一個例子。 ```javascript function Point(x, y) { this.x = x; this.y = y; } Point.prototype.toString = function () { return '(' + this.x + ', ' + this.y + ')'; }; var p = new P...

http://www.o2fo.com/escript6/escript6-qwg737fd.html

1215.JSON 使用

...裝成JSON格式,傳到前臺頁面之后,需要將JSON格式轉(zhuǎn)換為JavaScript對象,然后在網(wǎng)頁中使用該數(shù)據(jù)。 把 JSON 文本轉(zhuǎn)換為 JavaScript 對象 JSON 最常見的用法之一,是從 web 服務器上讀取 JSON 數(shù)據(jù)(作為文件或作為 HttpRequest),將 JSON ...

http://www.o2fo.com/json/json-eval.html

1216.32. 翻譯

This style guide is also available in other languages: armoucar/javascript-style-guide borislavvv/javascript fpmweb/javascript-style-guide jigsawye/javascript yuche/javascript nmussy/javascript-style-guide timofurrer/javascript-style-guide sinkswim/javascript-style-guide mitsuruog/javacript-style-g...

http://www.o2fo.com/rtuhtw/a5bdmozt.html

1217.ES6 簡介

##ES6 簡介## ECMAScript 6.0(以下簡稱 `ES6`)是 JavaScript 語言的下一代標準,已經(jīng)在 2015 年 6 月正式發(fā)布了。它的目標,是使得 JavaScript 語言可以用來編寫復雜的大型應用程序,成為企業(yè)級開發(fā)語言。 ##ECMAScript 和 JavaScript 的關(guān)系 ...

http://www.o2fo.com/escript6/escript6-827l37er.html

1218.Decorator

...的功能。 ## 1. 類的裝飾 裝飾器可以用來裝飾整個類。 ```javascript @testable class MyTestableClass { // ... } function testable(target) { target.isTestable = true; } MyTestableClass.isTestable // true ``` 上面代碼中,`@testable` 就是一個裝飾器。它修改了 `MyTestab...

http://www.o2fo.com/escript6/escript6-3fz737fq.html

1219.ES6 編程風格

...代 `var` ,因為兩者語義相同,而且` let `沒有副作用。 ```javascript 'use strict'; if (true) { let x = 'hello'; } for (let i = 0; i < 10; i++) { console.log(i); } ``` 上面代碼如果用 var 替代 let ,實際上就聲明了兩個全局變量,這顯然不是本意。變量...

http://www.o2fo.com/escript6/escript6-mjlf37fk.html

1220.ES6 Set 與 Map 數(shù)據(jù)結(jié)構(gòu)

... Set 本身是一個`構(gòu)造函數(shù)`,用來生成 Set 數(shù)據(jù)結(jié)構(gòu)。 ```javascript const s = new Set(); [2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); for (let i of s) { console.log(i); } // 2 3 5 4 ``` 上面代碼通過 add() 方法向 Set 結(jié)構(gòu)加入成員,結(jié)果表明 Set 結(jié)構(gòu)不會添...

http://www.o2fo.com/escript6/escript6-lx3y37f4.html

抱歉,暫時沒有相關(guān)的文章

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

熱門課程