Skip to content

Instantly share code, notes, and snippets.

@BhaveshSGupta
Created February 19, 2017 08:41
Show Gist options
  • Save BhaveshSGupta/6a891fe454b6a0211e40e6d57e2b0f4c to your computer and use it in GitHub Desktop.
Save BhaveshSGupta/6a891fe454b6a0211e40e6d57e2b0f4c to your computer and use it in GitHub Desktop.
Adding any lib from console
var cdn = "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js";
var script = document.createElement('script');
script.src = cdn;
document.getElementsByTagName('head')[0].appendChild(script); // Now Test the library methods // yes we have lodash loaded in the console
var array = [1, 2, 3];
_.reverse(array); // Ouput: [3, 2, 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment