結果 : detect the correct syntax for a function in javascript