Add `how to define a function in javascript`