i know how to check if a variable is set in PHP, how do you do it in javascript?

is there a function or method for it?