Sunday, March 10, 2013

ThisAndThat - Internet of Things

Follow along with me, this is quite clever.

If This Then That (https://ifttt.com), is a little rule aimed at the internet of things. In Javascript we like doing things a bit faster. In fact there's a shortcut operator for #IFTTT. It's called #ThisAndThat

    // If This is true, then execute the function That()

    If (This) { 
        That( );
    }


Using the shortcut AND operator in Javascript, we can rewrite the above code like so...

    This && That( );

So, next time you need to access the internet of things use a little bit of... 
This&&That... (pun intended).


Cheers,

Tim Montague
3/10/2013