ans = confirm('continue ?'); //returns a boolean response if (ans){ //condition returns true... } else(){ //condition returns false... }