The first argument is the array index to start at, and the second is the index to end on.
Check if the given string is an absolute URL
Use RegExp.prototype.test() to test if the string is an absolute URL.
Find the difference between two arrays with JavaScript
Compare two arrays and display the difference between the two.
Merge two or more arrays together
Call concat() on the first array, and pass each array to merge with it in as arguments. It returns a new array.
Generate a random hexadecimal color code
Use Math.random() to generate a random 24-bit (6 * 4bits) hexadecimal number.
Generate a random number in a given range with JavaScript
The following snippet returns a random number between min (inclusive) and max (exclusive).
Add items to an array in JavaScript
Add items to an array. Pass the new items in as arguments.
Smooth Scroll to the Top of the Page With JavaScript
Get distance from top using Document.documentElement or Document.body and Element.scrollTop.
Get the largest number from a set of numbers
Math.max() returns the largest number from a set of numbers. Pass each number in as an argument.
Remove HTML/XML tags from a string
Use a regular expression to remove HTML/XML tags from a string.