W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
語(yǔ)法:
Statement : Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement
語(yǔ)義:
一個(gè) Statement 可以是 LabelledStatement 的一部分,這個(gè) LabelledStatement 自身也可以是 LabelledStatement 的一部分,以此類(lèi)推。當(dāng)描述個(gè)別語(yǔ)句時(shí)引入標(biāo)簽的這種方式統(tǒng)稱(chēng)為“當(dāng)前標(biāo)簽組”。一個(gè) LabelledStatement 介紹了一個(gè)標(biāo)簽到一個(gè) 標(biāo)簽組 ,此外沒(méi)有其他語(yǔ)義。一個(gè) IterationStatement 或 SwitchStatement 的標(biāo)簽組最初包含單個(gè) 空 元素。任何其他語(yǔ)句的標(biāo)簽組最初是空的。
The result of evaluating a Statement is always a Completion value.
已知幾個(gè)廣泛使用的 ECMAScript 實(shí)現(xiàn)支持 FunctionDeclaration 當(dāng)作語(yǔ)句使用。然而,在實(shí)現(xiàn)之間這種 FunctionDeclarations 應(yīng)用的語(yǔ)義也有嚴(yán)重且不兼容的差異。由于這些不兼容的差異,將 FunctionDeclaration 當(dāng)作 Statement 使用的結(jié)果是代碼在實(shí)現(xiàn)之間的可移植性不可靠。建議 ECMAScript 實(shí)現(xiàn)禁止這樣運(yùn)用 FunctionDeclaration,或遇到這樣的運(yùn)用是發(fā)出一個(gè)警告。ECMAScript 的未來(lái)版本可能定義替代的兼容方案以在 Statement 上下文中聲明函數(shù)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: