This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
The challenge Given an array of positive integers, return the number with the most digits. If two numbers have the same number of digits, return the first one in the array. Examples: findLongest ([ 1 , 10 , 100 ]); // → 100 findLongest ([ 9000 , 8 , 800 ]); // → 9000 findLongest ([ 8 , 900 , 500 ]); // → 900 This puzzle is asked in JavaScript-flavoured Codewars, HackerRank, and front-end…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.