Fiserv interview question

How to write a class in javascript