Can anyone help me with this small JS function please?

Printable View