Silly-Say/WordSplitter.js

8 lines
176 B
JavaScript
Raw Normal View History

2016-12-29 12:52:31 +00:00
"use strict";
function splitWords(sentence) {
// Split the sentence on whitespace and return the resulting array
return sentence.split(/\s+/g);
}
export default splitWords;