Q. 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.
//#my solution
function findShort(s) {
let result = 0;
const short = s.split(" ").sort((a, b) => a.length - b.length);
return short[0].length;
}
//#other solution
function findShort(s){
return Math.min.apply(null, s.split(' ').map(w => w.length));
}