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