using logical operators

simple logical operators in javascript.