I'm novice with javascript and I really don't know how can I get the "networks" value.
scanner.scan(function(error, networks){
if(error) {
console.error(error);
} else {
console.log(networks); << print the correct value
}
});
console.log(networks) << print undefined
I just want to use "networks" outside function
Anyone could help me? Thanks!