benefits of using javascript code in an html document

How long will the footprints on the moon last? This tool was created specially for this goal. This can be done through code stored in a linked .js file, in an on-page