Error Javascript in CodePen

Hi Everyone

I entered the below code in Codepen in JS box but kept getting - unexpected token var.
Can someone please help.

Thanks
Tom

29%20PM

There shouldn’t be any HTML code in the JS editor (i.e., the <script> tag on line 1).

Thank you @kevcomedia