how to set a value in javascript