【JavaScript】配列操作 末尾を削除 pop
配列操作 末尾を削除 pop
構文 配列.pop(); 例 let colors = ['Red', 'Yellow', 'Blue']; console.log(colors); #=>["Red", "Yellow", "Blue"] colors.pop(); console.log(colors); #=>["Red", "Yellow"]
構文 配列.pop(); 例 let colors = ['Red', 'Yellow', 'Blue']; console.log(colors); #=>["Red", "Yellow", "Blue"] colors.pop(); console.log(colors); #=>["Red", "Yellow"]