20
This commit is contained in:
parent
259c013d78
commit
a27155555f
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
|
||||
var massive = [1111, 'test', true]
|
||||
var array = [1111, 'test', true]
|
||||
|
||||
console.log(massive[0])
|
||||
console.log(massive.length)
|
||||
console.log(array[0])
|
||||
console.log(array.length)
|
||||
@ -8,3 +8,9 @@
|
||||
*
|
||||
* 4. Выведите в консоль измененный массив
|
||||
*/
|
||||
|
||||
|
||||
var array = [1, true, null]
|
||||
console.log(array)
|
||||
array[1] = false
|
||||
console.log(array)
|
||||
@ -5,3 +5,9 @@
|
||||
* 2. Используя один из методов массивов, переберите все элементы
|
||||
* и выведите каждый элемент в консоль
|
||||
*/
|
||||
|
||||
|
||||
var array = [1, 2, 3, 4]
|
||||
array.forEach((item) => {
|
||||
console.log(item)
|
||||
})
|
||||
@ -6,3 +6,6 @@
|
||||
*
|
||||
* 3. Выведите в консоль длину результирующего массива
|
||||
*/
|
||||
var array = [1, 2, 3]
|
||||
array.push(4, 5, 6)
|
||||
console.log(array)
|
||||
@ -4,3 +4,7 @@
|
||||
*
|
||||
* 2. Выведите значение в консоль
|
||||
*/
|
||||
|
||||
var timeInMsec = Date.now()
|
||||
|
||||
console.log(timeInMsec)
|
||||
Loading…
Reference in New Issue
Block a user