How to merge, combine two different functions in javascript?

Printable View