πŸ“Š JavaScript
Q. What will be the output of the following JavaScript code?
Code:
<script>
    let cars = ['Honda', 'Hyundai'];
    cars.push('Mahindra');
    document.write(typeof cars + " " + cars);
</script>
  • (A) array Honda,Hyundai,Mahindra
  • (B) string Honda,Hyundai,Mahindra
  • (C) object Honda,Hyundai,Mahindra
  • (D) object "Honda", "Hyundai", "Mahindra"
πŸ’¬ Discuss
βœ… Correct Answer: (C) object Honda,Hyundai,Mahindra

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
210
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
88%
Success Rate