Consider following snippet:

var colors = ["red ","blue ","green ","pink "];
colors.pop();
colors.push("orange");
console.log(colors);
What will be printed to the console?
Explanation
array.pop() removes the last element in array and return that element. array.push() method add new element to array.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести