Blog

JavaScript – Indenting Text

One thing I needed to do recently was indent a series of strings with a variable number of tabs or spaces. Thusly, I decided to create the following function which can be used by anyone that would need such a function: The JS annotation pretty much sums up how you Read more…

By Chris West, ago
Blog

JavaScript – Range Array Function

A cool function that exists in Python is the range function which actually creates a list of numbers within the specified range. Once again, since I love JavaScript, here a quick imitation of this function: Of course, this is probably not a complete imitation, but as you can see it Read more…

By Chris West, ago
Blog

JavaScript – Create Stylesheet

At times you may need to add a dynamically created stylesheet to a page via JavaScript. You can do just that with the following function: It is important to note that the above function simply create the STYLE tag with the specified stylesheet content. It does not add it to Read more…

By Chris West, ago