Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
first_word_simplified solution in Uncategorized category for First Word (simplified) by Jon_Red
import assert from'assert';
function firstWord(text:string):string{return text.split(' ')[0];}
// self-checks
assert.equal(firstWord('Hello world'),'Hello');
assert.equal(firstWord('a word'),'a');
assert.equal(firstWord('hi'),'hi');
June 28, 2020
Comments: