C Sharp If Statement Syntax Javascript