Co-founder of Croquet.io • Chief Architect Multisynq.io • Creator of Squeak.JS.org • Formerly at Alan Kay’s groups (VPRI.org, CDG Labs, YCR HARC) • Dr (EngD) • German living in Los Angeles 🏳️🌈
The example app given in the first prompt: github.com/multisynq/mu...
The example app given in the first prompt: github.com/multisynq/mu...
* No damage? Nice, shield doesn’t break
* This attack breaks the shield? Okay, return the number of this attack
* Otherwise, this attack does damage, and we look at the next attack
I’ll admit that “straightforward” is … subjective 😇
* No damage? Nice, shield doesn’t break
* This attack breaks the shield? Okay, return the number of this attack
* Otherwise, this attack does damage, and we look at the next attack
I’ll admit that “straightforward” is … subjective 😇
dmgs.findIndex(dmg => (shld -= dmg) < 0)
👸🏻🛡️🔥🔥🔥🐉
codepen.io/codefrau/pen...
dmgs.findIndex(dmg => (shld -= dmg) < 0)
👸🏻🛡️🔥🔥🔥🐉
codepen.io/codefrau/pen...
Try this:
evaluatePostfix('123*+123++*')
Try this:
evaluatePostfix('123*+123++*')
function evaluatePostfix(s) {
let a = []
for (let c of s)
a.push(isNaN(+c) ? eval(a.splice(-2).join(c)) : c);
return a.pop()
}
My CodePen does the infix conversion first and evals at the end:
codepen.io/codefrau/pen...
function evaluatePostfix(s) {
let a = []
for (let c of s)
a.push(isNaN(+c) ? eval(a.splice(-2).join(c)) : c);
return a.pop()
}
My CodePen does the infix conversion first and evals at the end:
codepen.io/codefrau/pen...