不支援的陳 - Amazon Lex

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

不支援的陳

亞馬遜萊克斯 V2 不支持以下 ECMAScript 功能。

空白陳述式

空白陳述式用於不提供任何陳述式。以下是空白陳述式的語法:

;

繼續聲明

不含標籤的 continue 陳述式支援迭代語句。不支持帶有標籤的 continue 語句。

// continue with label // this allows the program to jump to a // labelled statement (see labelled statement below) continue <label>;

休息聲明

不含標籤的 break 陳述式支援迭代語句。不支援含有標籤的 break 陳述式。

// break with label // this allows the program to break out of a // labelled statement (see labelled statement below) break <label>;

退貨聲明

return expression;

拋出語句

throw 語句用於拋出一個用戶定義的異常。

throw expression;

嘗試聲明

try { statements } catch (expression) { statements } finally { statements }

調試器語句

調試器語句用於調用由環境提供的調試功能。

debugger;

標示陳述式

標籤化的陳述式可與 break or continue 陳述式搭配使用。

label: statements // Example let str = ''; loop1: for (let i = 0; i < 5; i++) { if (i === 1) { continue loop1; } str = str + i; } console.log(str);

類聲明

class Rectangle { constructor(height, width) { this.height = height; this.width = width; } }