new post on constructor in javascript