Multiple choice technology programming languages


var one = ["a", "b"];
alert(one.join("&&"));      

  1. a&&b

  2. ab&&

  3. a,b,&&

  4. error

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

The join() method combines array elements into a string using the specified separator. ['a','b'].join('&&') produces 'a&&b'. The separator goes BETWEEN elements, not after the last one, which is why option B is wrong.