DEV Community

Discussion on: In how many ways can you print in the console 50 times? (Javascript)

Collapse
 
davel_x profile image
davel_x

My first idea just looking at the title :

console.log(Array(51).join('Hello World '))
Enter fullscreen mode Exit fullscreen mode
Collapse
 
maxziebell profile image
Max Ziebell

Clean, simple... on point!

Collapse
 
noriller profile image
Bruno Noriller

Wouldn't pass the tests... but I guess...

¯_༼ᴼل͜ᴼ༽_/¯

Collapse
 
davel_x profile image
davel_x

That's because of an important rule in developing a ticket (jira, Trello, whatever...) - which I obviously didn't do : don't start coding just after reading the title, read everything carefully. :D