Given a sentence and a number, return an array of the first n words in the sentence.
// input:
const s = 'The gecko climbs on the ceiling', n = 3
// output:
[ 'The', 'gecko', 'climbs' ]
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)
Given a sentence and a number, return an array of the first n words in the sentence.
// input:
const s = 'The gecko climbs on the ceiling', n = 3
// output:
[ 'The', 'gecko', 'climbs' ]
/* output */