-
-
Save aereal/75162ebaacdebde4f547b711e9c3ef40 to your computer and use it in GitHub Desktop.
oopsを表示させずにhelloのみを表示させる方法を答えよ
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* hello() { | |
try { | |
while(true) { | |
yield 9 | |
yield 3 | |
yield 2 | |
} | |
} catch(e) { | |
console.log('oops') | |
} finally { | |
console.log('hello') | |
} | |
} | |
const h = hello(); | |
h.next(); | |
h.return('hakobe'); // hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment