Skip to content

Instantly share code, notes, and snippets.

@suyesh
Last active December 14, 2020 04:17
Show Gist options
  • Save suyesh/6adb3a0e8bf7ad7512bae5fb83bf3e1d to your computer and use it in GitHub Desktop.
Save suyesh/6adb3a0e8bf7ad7512bae5fb83bf3e1d to your computer and use it in GitHub Desktop.
// Changes too Carlie's async func code
//This program is fetching data from google trend api for a particular job title
var googleTrends = require('google-trends-api');
var fs = require('fs');
var data;
function wild(){
googleTrends.autoComplete({keyword: "blue"})
.then(function(response) {
data = response
console.log(data)
}).catch(function(err){
console.log(err)
})
};
wild()
console.log(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment