Blog

JavaScript Snippet – getClass()

If you have been using JavaScript for a little bit you probably already know how to determine a variable’s class constructor, but just in case you are overthinking it here is a hint: variable.constructor. 🙂 Of course, many times I like to make functions that will spit my results for Read more…

By Chris West, ago
Blog

JavaScript Snippet – String.prototype.after()

WARNING: Extending native prototypes is frowned upon by many JS engineers but can be helpful as long as the extensions are properly documented in the codebase. SCRIPTER’S DISCRETION IS ADVISED. 😆 Yesterday I added a post about String.prototype.before(...). As is explained within the post, this function can be used to Read more…

By Chris West, ago
Blog

JavaScript – Creating Classes

As many people know, JavaScript doesn’t really have classes but you can mimic some of their behavior with the prototypal setup available in JavaScript. Still, a lot of times it is just easier when you have a function that does most of the work for you. For that reason, I Read more…

By Chris West, ago