how to call function with parameter in javascript