sample code js to coffee