menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Daily Java...
source image

Dev

4w

read

93

img
dot

Image Credit: Dev

Daily JavaScript Challenge #JS-187: Find the Shortest Word in a Sentence

  • Daily JavaScript Challenge: Find the Shortest Word in a Sentence
  • Given a sentence, write a function to find the shortest word in the sentence. If there are multiple words with the same shortest length, return the first one that appears.
  • Check out the documentation about this topic here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split
  • Join the discussion on approaches, edge cases, and learnings from this challenge in the comments below.

Read Full Article

like

5 Likes

For uninterrupted reading, download the app