結果 : how to handle undefined value in javascript