Last active
February 10, 2022 21:37
-
-
Save tanner-west/1432f9d34caf331f2f3caaef07471f89 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
function getTwoPlusTwo() { | |
return 2 + 2 | |
} | |
function* mathSaga() { | |
const sum = yield getTwoPlusTwo() | |
console.log("two plus two equals: ", sum) | |
const sum2 = yield call(getTwoPlusTwo) | |
console.log("two plus two again equals: ", sum2) | |
} | |
// two plus two equals: 4 | |
// two plus two again equals: 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment