check value true false js code example Example: javascript if return true false return condition ? value : otherValue;