Blog

POW – JavaScript Self Inequality

Assuming a normal JavaScript engine, what could you possibly pass into the following mystery() function that would not thrown an error? As is normal, this answer will be shown a week from when it was posted and will be linked to from here.The answer to this POW can now be Read more…

By Chris West, ago
Blog

JavaScript – Global Eval

One of the supposedly evil things that is available in jQuery is eval. The type of eval that is available is of the global variety. In other words globalEval provides the ability to execute JavaScript code from a string in the global scope. Most people don’t realize it, but eval Read more…

By Chris West, ago
Blog

JavaScript – Date Difference Function

A few months ago I wrote a blog post about extensions to the Date.prototype. That post provided ways to add date parts and subtract date parts. Today’s post shows you how to use a generic Date.prototype.diff() function to find the difference between two dates and optionally return a string specifying Read more…

By Chris West, ago