d3.scale.category20 is too smart for me

Can anybody explain to me why these two expressions return different values… … in the following context Working example… Expand snippet The user agent reported in my system is Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36 I kind of get the above behaviour but this is very strange… Why is this… … Read more

JavaScript string encryption and decryption?

I’m interested in building a small app for personal use that will encrypt and decrypt information on the client side using JavaScript. The encrypted information will be stored in a database on a server, but never the decrypted version. It doesn’t have to be super duper secure, but I would like to use a currently … Read more

What is the equivalent of Java’s System.out.println() in Javascript?

Essentially console.log(“Put a message here.”) if the browser has a supporting console. Another typical debugging method is using alerts, alert(“Put a message here.”) RE: Update II This seems to make sense, you are trying to automate QUnit tests, from what I have read on QUnit this is an in-browser unit testing suite/library. QUnit expects to … Read more