split a message js

Solutions on MaxInterview for split a message js by the best coders in the world

showing results for - "split a message js"
Elias
10 Jun 2018
1const message = 'This is a test'
2
3var args = message.split(' ');
4
5console.log(args[0]) // Responds "This"
6console.log(args[1]) // Responds "is"
7console.log(args[2]) // Responds "a"
8console.log(args[3]) // Responds "test"