Blog

JavaScript – Primitives & Objects

Purpose of the valueOf() Function Let me start off by explaining the commonly misunderstood valueOf() function. The purpose of this function is to return a primitive which represents the specified object. Why is this necessary? Let’s use the following code to illustrate why: If you were to execute this code, Read more…

By Chris West, ago
Blog

Excel – Coalesce Function?

Unfortunately, after googling for a while, I was unable to find a COALESCE function or something similar that natively exists within Excel. Therefore, I decided to write a quick-and-dirty formula that would approximate it. I used the following array formula to pull the first non-blank value from cells C2 to Read more…

By Chris West, ago
Blog

VBScript – CamelCase Function

One of the things that is often used in the JavaScript Prototype library is the camelize function which camel-cases the specified string. Unfortunately, just as this function doesn’t exist natively in JavaScript, it also doesn’t in VBScript. If you do need an equivalent function to that which is available in Read more…

By Chris West, ago
Blog

JScript – Global Scope Object

If you have ever written JavaScript for a web page, one of the first things that you learned may have been that the window object is basically a reference to the global scope. On the other hand, if you have ever programmed in JScript (Windows Scripting Host), you will know Read more…

By Chris West, ago