The StripHtml function strips all the HTML tags in the passed string but preserves the ones specified in the PreserveTags array.
Swap string case using JavaScript
The SwapCase function turns lowercase characters into uppercase and uppercase characters into lowercase.
Inverse Hex Colors
With this function you can get the inverse of a color passed into as a hex value.
Get Real Angle Value
Given a large angle, or a negative angle, a number equal to 0 or bigger, and smaller than 360 is returned.
Introducing operators
You’ll get familiar with JavaScript’s operators. Assignment operators, arithmetic operators, comparison operators, logical and conditional operators… This is another chapter of my old, unfinished book, ‘JavaScript Class’. You’ll get familiar with operators really soon, that’s because you already know the basics of them. Yes, you do. You learned about them in your first years of […]
Get the greatest common divisor
This efficient JavaScript function returns the greatest common divisor of a series of numbers.
Get the Last Day of the Month
This one line JavaScript function gets the last day of the month, for the specified month and year.
Array of States and Their Coordinates
An array of state abbreviations and their approximate GPS coordinates.
Back, Forward and Refresh using JavaScript
Navigating back, forward and refreshing the browser page using JavaScript.
Preload images using JavaScript
This code shows you how to preload a set of images using JavaScript so that you can later use them without having to wait for them to load.