結果 : if element is not undefined javascript