Q. What will be the output of the following JavaScript code?
Code:<script>
var cars = ["Honda","Hyundai","Mahindra"];
var result = cars.unshift("Toyota", "Tata");
document.writeln("[", result, "] ", cars);
</script>
β
Correct Answer: (A)
[5] Toyota,Tata,Honda,Hyundai,Mahindra