未定義元素
1 | let ar = [1,,,,58]; //[ 1, <3 empty items>, 58 ] |
函式定義運算式
1 | let square = function(x){ |
迴圈
1 | //while |
函式
1 | function text(){ |
引數
1 | function text(a, b){ |
箭頭函式
1 | const x = () => "hello"; |
陣列
1 | //經典的sort |
物件
1 | class car{ |
簡單遞迴
1 | const fact = function(x) { |