What will be the output of the following JavaScript code?

var val1=[1,2,3]; var val2=[6,7,8]; var result=val1.concat(val2); document.writeln(result);

a) 1, 2, 3
b) Error
c) 1, 2, 3, 6, 7, 8
d) 123

1 Like

the result is
c) 1,2,3,6,7,8

2 Likes

option c- 1,2,3,6,7,8

2 Likes

option - c :- 1, 2, 3, 6, 7, 8

2 Likes