Web開発を学んでいくと、よく登場するのが「配列(Array)」です。 配列は、複数のデータをひとまとめにして扱うための仕組みです。 たとえば「1、2、3」という3つの数値を1つの変数で管理したいとき、配列を使うことで [1, 2, 3] のようにまとめて扱えます。
As you learn web development, you will frequently encounter "Arrays". An array is a mechanism for handling multiple pieces of data as a single unit. For example, when you want to manage three numbers ...
Not only can you shift elements off of the beginning of an array, you can also unshift elements to the beginning of an array i.e. add elements in front of the array.
//The shift() method removes the first element from an array and returns that removed element. //This method changes the length of the array. //The unshift() method adds one or more elements to the ...