結果 : pure and impure functions in javascript with example