7 kyu · reference

Shortest Word

Fundamentals

Simple, given a string of words, return the length of the shortest word(s).

String will never be empty and you do not need to account for different data types.

Solutions

01-solution.jsView on GitHub ↗
function findShort(s) {
	return Math.min(...s.split(' ').map((v) => v.length));
}