Q. what will be the output of below JavaScript code?
Code:var val = "JavaScript String"
splittedVal = val.split('a',2)
console.log(splittedVal);
β
Correct Answer: (A)
[ 'J', 'v' ]
var val = "JavaScript String"
splittedVal = val.split('a',2)
console.log(splittedVal);
You must be Logged in to update hint/solution