constructor function in javascript syntax