結果 : check if var is not undefined javascript