by zengid · 10y ago · 0 comments
function getDevJob(studying, hardWork, luck){
return studying && hardWork && luck;
}
I know that it might not make the code readable to novice javaScripters, but it bothers me anyway..It's a rhetorical device. And some could argue that code is also a rhetorical device.
But the only argument an if else block that returns true or false based on a boolean makes is "I'm not very good at this"
On a similar note, another thing novice programmers do often is rewrite min and max using if-else.