DEV Community

Discussion on: 8 neat Javascript tricks you didn't know in 4 minutes.

Collapse
 
danielwu profile image
Daniel Wilianto

parseInt makes it obvious that we want to get an integer (from string). Using +"123" is confusing, and it's not apparent that we want to get integer 123. There is a reason why programming languages use natural language.

Thread Thread
 
blessinghirwa profile image
Blessing Hirwa

yes but there's always a reason why something was invented. Sometimes you'll see where people used these kind of tricks so it's good to know them too.

Thread Thread
 
lloydfranklinsmith profile image
Lloyd Franklin Smith

It definitely is good to know and your article did a good job of explaining it.

Some comments have been hidden by the post's author - find out more