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 2028 times
Edit
4
Community Evaluations
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.