Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

find minimum length word in a phrase

function findShort(s)
{
    return Math.min(...s.split(" ").map (s => s.length)); // minimum
    return Math.max(...s.split(" ").map (s => s.length)); // max - optional
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: changing CSS with JS, using a function - strips all CSS and re-adds classes passed by 2nd parameter - as an Array 
Javascript :: Spread Syntax for function 
Javascript :: get members of a group graph pnp js 
Javascript :: swift read json from url 
Javascript :: solana solana-Web3.js change for devnet lamports to production transaction 
Javascript :: como acrescentar item no array js 
Javascript :: likedislike mangodb 
Javascript :: regular expressiong to indentify bible references in a sentence 
Javascript :: how to save js object to clipboard 
Javascript :: o que e window.onload js 
Javascript :: npm dinosaur game 
Javascript :: how to set up click event listeners javascript 
Javascript :: launch chrome in incognito and dev tools 
Javascript :: useContext from localhost 
Javascript :: javascript split domain 
Javascript :: java home sdk error 
Javascript :: js convert charcode to char 
Javascript :: read url jsf 
Javascript :: occurences of special character in a string javascript 
Javascript :: concatenate to require string in solidity ethereum 
Javascript :: javascript prototype chaining in stackoverf 
Javascript :: js remove null object 
Javascript :: generator object loop over length 
Javascript :: show more vs editor shortcut key 
Javascript :: loopover iterate elements by name js 
Javascript :: npx create-next-app permission denied 
Javascript :: copy current filename in emacs 
Javascript :: H.C.F Calculation Program 
Javascript :: "json" is not defined 
Javascript :: vue format number as dollars 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =