That is where console logging can be of assistance. Modern web browsers all have a developer tools menu built-in out of box (generally available by pressing F12). This menu will have a console option which commonly displays JavaScript information and also allows you to interact with the page via command line. There are four different options for manually outputing messages to the console:
console.error("error");These then get output as the following:
console.log("log");
console.warn("warn");
console.info("info");
No comments:
Post a Comment