Need some help with some JS logic

Printable View