Fix all errors in this code?
So I discovered jsLint a few minutes ago. (https://www.jslint.com/) I decided to try it out as i'm trying to improve my coding skills. I pasted a code I wrote that displays errors on screen with the line number that the error occurred on. Here's the code: "use strict"; try { //Empty try block. You can add whatever you want here. } catch(error) { window.onload = function ErrorMessage() { var erroutput = document.getElementById("Error"); var err = error.stack; err = err.match(/:[0-9]*:/); err = error + " Line " + err + ")"; err = err.replace(/:/g, ""); erroutput.innerText = err; }; } How can I correct all of the errors I receive? 1. Unexpected "use strict". (No idea why this is occurring) "use strict"; 2. Empty block. (Easily Fixable) try { 3. Unexpected trailing space. (Easily Fixable) (This is just from the empty try block, which is fixed by adding code to the try block) This function needs a "use strict" pragma. (No idea why this is occurring) window.onload = function ErrorMessage() { EDIT: Turning off "a browser" gives me these errors: 1. Undeclared 'window'. window.onload = function ErrorMessage() { 2. Undeclared 'document'. var erroutput = document.getElementById("Error");