Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCPUInfo() {
- return new Promise((resolve) => {
- resolve();
- })
- .then(() => {
- console.log("Gathering CPU information...");
- return si.cpu()
- // .then(data => cpuInfo = data) - no need for this, the promise will resolve with "data"
- .catch(err => console.log(err));
- })
- .then(() => {
- console.log("here");
- });
- }
- getCPUInfo().then((cpuInfo) => console.log(cpuInfo));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement