Using function's return value in if statement

Viewed 57340

Hopefully a quick question here.

Can you use a function's returned value in a if statement? I.e.

function queryThis(request) {

  return false;

}

if(queryThis('foo') != false) { doThat(); }

Very simple and obvious I'm sure, but I'm running into a number of problems with syntax errors and I can't identify the problem.

5 Answers
Related