๊ฐ๋จํ ์ ํ ์ํ ๋จธ์ ๊ตฌํํ๊ธฐ
function Automaton()
{
this.currentState = 'q1';
this.states = [{
๋ฌธ์์ด๋ก๋ ์ซ์์ ํฉ์ ๊ตฌํ๊ธฐ
๋ฌธ์์ด์ ๊ธธ์ด๋ ๊ฝค ๊ธธ ์๋ ์๊ธฐ ๋๋ฌธ์ ๋จ์ ๋ง์ ์ฐ์ฐ๋ง์ผ๋ก ์๋๊ณ ....์๋ผ๋ค๊ฐ ์๋ฆฌ๋ง๋ค ๋ง์ ํ๊ณ ์บ๋ฆฌ๋ฅผ ๊ณ์ฐํ๊ณ ํด์ผํจ
function sumStrings(a,b) {
var removeZero = s=> s.substr([1,2,3,4,5,6,7,8,9]
.map(n=>s.indexOf(n))
.filter(n=>n!=-1)
Pete, the baker (part 2)
์ฌ๋ฃ๋ฅผ ๋ชจ๋ ์ฌ์ฉํ ์ ์๋ ๊ฐฏ์์ ๋ํ ๋ถ์กฑ๋ถ์ ๊ณ์ฐ(? ๋ง๋ก ์ ์ผ๋๊น ์ด์ํ๋ฐ?)
var recipe = {flour: 200, eggs: 1, sugar: 100};
getMissingIngredients(recipe, {flour: 50, eggs: 1}); // must return {flour: 150, sugar: 100}
getMissingIngredients(recipe, {}); // must return {flour: 200, eggs: 1, sugar: 100}
getMissingIngredients(recipe, {flour: 500, sugar: 200}); // must return {flour: 100, eggs: 3, sugar: 100}
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
https://danielmiessler.com/study/vim/
Verbs are the actions we take, and they can be performed on nouns. Here are some examples:
d
: delete
c
: change
๋ฌธ์์ด
1 3 +
์ ๊ณ์ฐ
function calc(expr) {
if (!expr) return 0;