πŸ“Š JavaScript
Q. What will be the output of the following JavaScript code?
Code:
<script>  
var string1=[1,2,3];  
  
var string2=[4,5,6,7,8,9,10];  
var result=string1.concat(string2);  
document.writeln(result);  
</script>  
  • (A) 1, 2, 3
  • (B) Error
  • (C) It will concatenate both the stings and print as 1, 2, 3, 4, 5, 6, 7, 8, 9 ,10
  • (D) It will print nothing
πŸ’¬ Discuss
βœ… Correct Answer: (C) It will concatenate both the stings and print as 1, 2, 3, 4, 5, 6, 7, 8, 9 ,10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
361
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Yashika
Publisher
πŸ“ˆ
84%
Success Rate