Answers for "split a message"

1

split a message

const message = 'This is a test'

var args = message.split(' ');

console.log(args[0]) // Responds "This"
console.log(args[1]) // Responds "is"
console.log(args[2]) // Responds "a"
console.log(args[3]) // Responds "test"
Posted by: Guest on November-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language