Write code in JavaScript