2021年1月13日解決済み

分割代入で何をしているのかわかりません

ユーザー

ここでどのような操作がされているのかがわかりません。
よろしくお願いします。

[
this.tiles[blankRow][blankCol],
this.tiles[destRow][destCol],
] = [
this.tiles[destRow][destCol],
this.tiles[blankRow][blankCol],
];

[blankCol, blankRow] = [destCol, destRow];

スタッフ

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?