Hexagon interview question

How do you write a code in Js