Multiple choice technology programming languages


var one = ["a", "b", "c"];          
one.pop();          
alert(one);     

  1. a,b

  2. b,c

  3. error

  4. a,b,c

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The pop() method removes and returns the last element of an array. After ['a','b','c'].pop(), the array becomes ['a','b']. When alerted, this displays as 'a,b' (the default array-to-string conversion uses commas).