Go Back

JavaScript - Sample Interview Question (Junior Level)

What will be the output of the following code?

var simpleArray = ['A','C','E','G','I','K'];
var anotherArray = simpleArray;
simpleArray = [];
console.log(anotherArray);
  1. undefined
  2. no output
  3. ["A", "C", "E", "G", "I", "K"]
  4. []
Tests in JavaScript for Juniors

Test Name Difficulty Time (minutes) No. of Questions
JavaScript Junior 20 10