HTML encoding simply replaces HTML special characters like angle brackets with HTML entities so they can be displayed as plain text in a web page.
A slug is typically all lower case, separated by dashes (hyphens) instead of spaces and doesn't contain any special characters.
I created the below function recently to encapsulate error handling logic for multiple JS object methods in a single place.
Published: January 06 2023
This is a super quick post to show how to add an event listener to multiple HTML elements in pure JavaScript.
Published: January 04 2023
This is a quick post to show how easy it is to implement modal popups in pure HTML, CSS and JavaScript.
Published: December 16 2022
This is a super quick post to show how to sort an array of objects by property value in JavaScript (or TypeScript).
Published: December 06 2022
This is a super quick post to show how to initialize an array with conditional values in JavaScript (or TypeScript).
Published: October 15 2021
Some quick examples of how to convert a string to a number in JavaScript
Published: October 02 2021
Some quick examples of how to generate a range of numbers in an array in JavaScript.
Published: September 14 2021
A quick example of how to get the maximum value of a property in an array of objects in JavaScript