how to pass variable in javascript