Blog

Math In the Address Bar

Did you know that you can do math problems in the address bar of your browser? Regardless of what browser your using, you can use its address bar to find the answer to an arithmetic problem. For instance, let’s say that you are using Internet Explorer and all of a Read more…

By Chris West, ago
Blog

Power Set

As I was beefing up my past implementation of cartesianProductOf(), I decided to look into set theory a little bit more. After looking through some Wikipedia pages, I found another process that may be of interest to JavaScript programmers that have to deal with sets: a JavaScript implementation of finding Read more…

By Chris West, ago
Blog

Cartesian Product of Multiple Arrays

A few weeks ago, I came across a question about finding the cartesian product of two or more arrays in JavaScript. For anybody who is looking to do so, I posted the following code on stackoverflow: function cartesianProductOf() { return Array.prototype.reduce.call(arguments, function(a, b) { var ret = []; a.forEach(function(a) { Read more…

By Chris West, ago