how to set properties in javascript