Category Archives: Javascript

The incredible power of the Watson API

I just rounded the corner of building a small extension using the Watson API. It just tells you the type of tone a certain piece of writing contains. Watson does way more. For FREE! Yes the IBM Watson that whooped Jeoparday’s ass a few years back. You can talk to it with Javascript. Are you kidding me!? How is everybody not trying to do this? You can get started by clicking here. You don’t even need to know how to program to just explore and see what it can do. Demos that are already set up for you.
Watson Logo

Attaching variables to the window object

Concepts and other code to remember

Some interesting logs to the console. I took a few seconds to ponder the following boolean interrogations after watching this video here.

var a = 1;
var b = "Jack";

function foo(){
    var a = "Jack"
    console.log(window.a == a);
    console.log(this.a == window.a);
    console.log(a == window.b);
    console.log(b == a);
    console.log(this.b == this.a);


Results in… (click to enlarge)

Screen Shot 2015-02-10 at 4.21.41 PM