I hereby claim:
- I am subramaniashiva on github.
- I am sivasubramaniam (https://keybase.io/sivasubramaniam) on keybase.
- I have a public key ASBszw8F6F-3mjN6KQ4un51ynnkfhyXfw1SyYDuO6xtvjAo
To claim this, I am signing this object:
| fetch('https://images-api.nasa.gov/search?q=galaxy') | |
| .then(response => response.json()) | |
| .then(data => console.log(data)) | |
| .catch(err => console.log(err)); |
| // Create a new XMLHttpRequest Object | |
| const xhr = new XMLHttpRequest(); | |
| // Initialize the object by calling open method | |
| xhr.open('GET', 'https://images-api.nasa.gov/search?q=galaxy'); | |
| // Track the state changes of the request. | |
| xhr.onreadystatechange = function () { | |
| const DONE = 4; // readyState 4 means the request is done. | |
| const OK = 200; // status 200 is a successful return. | |
| if (xhr.readyState === DONE) { |
I hereby claim:
To claim this, I am signing this object:
| /*jslint browser:true */ | |
| /*global console:true */ | |
| /*global window:true */ | |
| 'use strict'; | |
| //The motive of the script is to execute a function using a string whose value is the function name | |
| //printMe is a function that needs to be called when user passes the string "printMe" | |
| var printMe = function (a, b) { | |
| console.log(a, b); | |
| }; |