Javascript

Javascript – Equality (==) Operator VS Strict Equality (===) Operator

In Javascript, there are two options when comparing values in a condition. These comparison options are equality (==) and strict equality (===). Javascript is a loosely typed language which means that variables can be assigned different data types during execution of the application and different data types can be compared in a conditional. In strictly …

Javascript – Equality (==) Operator VS Strict Equality (===) Operator Read More »

Javascript – When To Use console.dir() Instead Of console.log For Debugging

When debugging javascript it is common to use console.log() to print variables or messages to the browser’s dev tools console. The dir() method is another tool for logging that can be useful in certain situations. From the MDN Web Docs, console.dir() is given the following description: “The method console.dir() displays an interactive list of the properties of …

Javascript – When To Use console.dir() Instead Of console.log For Debugging Read More »

Javascript – How To Add CSS Styles To console.log Messages

In Javascript, console.log() is used to print messages to the developer tools console to help with debugging. The console output can be updated to have CSS styles. This can be helpful when debugging if you have many console messages and you would like a certain message to stand out to be able to quickly find …

Javascript – How To Add CSS Styles To console.log Messages Read More »