What will be the output of the following code snippet
const str1=’Geeksfor’
const str2=’Geeks’
const str3=str1.concat(str2)
console.log(str3)
(A) GeeksforGeeks
(B) GeeksGeeksfor
(C) undefined
(D) None of the above
Answer: (A)
Explanation: concat method in strings is used to concatenate two strings
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Recommended Articles