Skip to content

Instantly share code, notes, and snippets.

View XHMM's full-sized avatar
:octocat:
Tomorrow should be better

xiao xin XHMM

:octocat:
Tomorrow should be better
View GitHub Profile
@XHMM
XHMM / machine.js
Created April 11, 2021 17:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@XHMM
XHMM / throw_and_return_in_sync_and_async.js
Last active October 13, 2019 14:39
write output of the code
async function aa() {
try {
return Promise.reject('return reject')
} catch (e) {
console.log(e)
}
}
aa().then(val => {
console.log(val);
}).catch(err => {