showing results for - "function that return shortest of words in the given array js"
Manuela
08 Jan 2020
1words = ["one", "two", "three"];
2
3function getShortestWord(wordsArray) {
4	return wordsArray.sort((a, b) => a.length - b.length)[0];
5}
6
7console.log(getShortestWord(words));