ユーザ用ツール

サイト用ツール


サイドバー

javascript:分割代入

以前のリビジョンの文書です


分割代入

[a, b] = [10, 20];

console.log(a);
// expected output: 10

console.log(b);
// expected output: 20

[a, b, ...rest] = [10, 20, 30, 40, 50];

console.log(rest);
// expected output: [30,40,50]
const { latitude, longitude } = position.coords;
javascript/分割代入.1553914359.txt.gz · 最終更新: 2019/03/30 11:52 by ips