<html>
<body>
<script type="text/javascript">
var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.unshift("Kiwi") + "<br />");
document.write(fruits.unshift("Lemon","Pineapple") + "<br />");
document.write(fruits);
</script>
<p><b>Note:</b> The unshift() method does not work properly in Internet Explorer, it only returns undefined!</p>
</body>
</html>
<body>
<script type="text/javascript">
var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.unshift("Kiwi") + "<br />");
document.write(fruits.unshift("Lemon","Pineapple") + "<br />");
document.write(fruits);
</script>
<p><b>Note:</b> The unshift() method does not work properly in Internet Explorer, it only returns undefined!</p>
</body>
</html>
Result