# 配列の最後に値を追加する(Array.push) > 配列に新しい要素を追加します。 - カテゴリ:配列(arrays) - ブロック:配列 の最後に○ を追加 - URL:https://makecode.minecraft-okinawa.com/reference/arrays/push/ - Pythonでの名前:Array.append - 公式データ取得日:2026-11-13 - 動作確認:確認待ち ## JavaScript ```javascript [""].push("hello") ``` ## Python ```python [""].append("hello") ``` ## 引数 | 名前 | 値 | 意味 | |---|---|---| | item | T | | ## 使用例 ### You might have an array with 3 numbers, like 1, 2, and 3. If you want to add another number to the end, then you push it on to the array. You do it like this: ```javascript let thoseNumbers = [1, 2, 3]; thoseNumbers.push(4); ``` ```python thoseNumbers = [1, 2, 3] thoseNumbers.append(4) ``` ### Add another animal to the end of your list of favorite pets. ```javascript let pets = ["cat", "dog", "parrot", "goldfish"]; pets.push("guinea pig"); ``` ```python pets = ["cat", "dog", "parrot", "goldfish"] pets.append("guinea pig") ``` ## 出典 - [MakeCode for Minecraft 公式リファレンス(Array.push)](https://minecraft.makecode.com/reference/arrays/push) 執筆:鈴木孝昌(現役プロジェクトマネージャー/マイクラカップ指導者)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)