Question from the Javascript test

Write a Javascript code that displays the contents of the table : Peter, Paul, Jacques, and the length of the table.

Easy

What does the following code display? More than one answer possible.

(We accept answers that only correspond to a part of everything that the program generates as output)

var arr = ['Peter', 'Paul', 'Jacques'];
console.log(arr.join(','));
arr.push('John');
console.log(arr[0]);
console.log(arr.length);
Author: Jean-marie CléryStatus: PublishedQuestion passed 2115 times
Edit
3
Community Evaluations
developer avatar
Obsolete
Benoit
17/09/2024
cette question était obsolète il y a 8 ans
developer avatar
Incorrect answer
Danylo Ohurtsov
12/09/2024
there is no Jean in the code
developer avatar
Anna
18/08/2023
can't understand console shows: Peter,Paul,Jacques Peter 4 so that correct answer is 4
developer avatar
Auteur anonyme
18/08/2023
Hello Anna, there is more than one answer possible.
developer avatar
Auteur anonyme
24/08/2023
The name "Peter" was translated in one place, not the other.