apiCheck.js example

Check the console... And the code. Edit in JS Bin