Created
January 30, 2022 16:40
-
-
Save pannet1/1164f43295603835996ae4bcbfd8721e to your computer and use it in GitHub Desktop.
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
// contents of NIFTY.json | |
[ | |
17861.5, | |
17890, | |
17613.15, | |
17900 | |
] | |
// index.js begins | |
const get_prediction = () => { | |
pre = fetch('./NIFTY.json') | |
.then((response) => { | |
response.json(); | |
}) | |
.then((data) => { | |
return data; | |
}); | |
return pre | |
} | |
// following should return the array stored in the json file | |
pre = get_prediction() | |
console.log(pre) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment