Created
January 3, 2020 19:52
-
-
Save gitmrwick/a19fee790f6af240db69f91555ab3300 to your computer and use it in GitHub Desktop.
helping javascript global scope confusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('products.json').then(function(response) { | |
return response.json(); | |
}).then(function(json) { | |
initialize(json); | |
}).catch(function(err) { | |
console.log('Fetch problem: ' + err.message); | |
}); | |
function initialize(json) { | |
finalGroup = json; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment