coding style - return a conditional statement in javascript -


i have kind of method:

function() {   if (condition) {     return true;   }   return false; } 

i thought of returning condition , make more clean, , maybe more readable. this:

function() {   return (condition); } 

is considered practice?

if there no other code returning true/false yes, return condition.

function() {     return (condition); } 

just said, more readable, less code. wouldn't call practice, it's more first code bad practice.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -