{"id":330,"date":"2017-01-23T12:49:08","date_gmt":"2017-01-23T03:49:08","guid":{"rendered":"http:\/\/www.mukgee.com\/?p=330"},"modified":"2017-01-23T12:49:08","modified_gmt":"2017-01-23T03:49:08","slug":"es6%eb%b3%80%ec%88%98-%ec%84%a0%ec%96%b8","status":"publish","type":"post","link":"http:\/\/mukgee.com\/?p=330","title":{"rendered":"[ES6]\ubcc0\uc218 \uc120\uc5b8"},"content":{"rendered":"<p>ES6(\ubd80\ub974\ub294 \uc6a9\uc5b4\uac00..\u00a0ECMAScript 6\ub77c\uace0 \ubd80\ub974\uae30\ub3c4\ud558\uace0,\u00a0ECMAScript 2015 , ES6 , <del>\ubb50 \uc5ec\ud2bc<\/del>) \uc5d0 \ub300\ud574 \ucc9c\ucc9c\ud788 \uacf5\ubd80\ud574\ubcf4\uc790<\/p>\n<p>\uc77c\ub2e8 \ub0b4\uac00 \uc54c\ub358 Javascript \uc640 \ub2e4\ub978 \uccab\ubc88\uc9f8\ub294 \ubcc0\uc218 \uc120\uc5b8\uc5d0 \uad00\ud55c \ud0a4\uc6cc\ub4dc \uc774\ub2e4<\/p>\n<p>\uae30\uc874\uc758 Javascript \ub294 var\ub85c \ubaa8\ub4e0 \uac83\uc774 \ud574\uacb0 \ub418\uc5c8\ub2e4. var\uc758 \uacbd\uc6b0 \uc911\ubcf5\uc120\uc5b8 \/ \ud568\uc218 scope \ub4f1\uc758 \ud2b9\uc9d5\uc744 \uac00\uc9c4\ub2e4.<\/p>\n<p>\ubc18\uba74, let\uacfc const \ub294 \uc911\ubcf5 \uc120\uc5b8\uc774 \ubd88\uac00\ub2a5\ud558\uace0\u00a0Block-scope\ub97c \uac00\uc9c4\ub2e4(bracket \ubc94\uc704). \uc774\ub7f0 \ud2b9\uc9d5 \ub54c\ubb38\uc5d0 \ub2e4\ub978 \uc5b8\uc5b4\ub4e4\uacfc \ube44\uad50\ud574\uc11c Javascript \uac00 \uac00\uc84b\ub358 \ubb38\uc81c\uc810(\ubb38\uc81c\uc810\uc778\uc9c0 \uc7a5\uc810\uc778\uc9c0 \uc54c\uc218 \uc5c6\uc73c\ub098.. Hoisting\uc5d0 \ub530\ub978 \uc911\uad6c \ub09c\ubc29 \ubcc0\uc218 \uc120\uc5b8\uc774\ub098 \uc911\ubcf5 \uc120\uc5b8 \ub4f1)\uc744 \ud574\uacb0 \ud560 \uc218 \uc788\uac8c \ub41c\uac70 \uac19\ub2e4.<\/p>\n<p>\ud2b9\ud788 \ubcc0\uc218\uc758 \ubc94\uc704\uac00 \u00a0\ube14\ub7ed scope\uc774\uae30 \ub54c\ubb38\uc5d0 \uae30\uc874\uc758 Javascript \uc5d0 \uc775\uc219\ud55c \uac1c\ubc1c\uc790\ub4e4\uc740 \uc870\uc2ec\ud574\uc57c\ud560\uac70 \uac19\ub2e4.<\/p>\n<p>Const \uac19\uc740 \uacbd\uc6b0\uc5d0 \uc880 \ud2b9\ubcc4\ud55c\ub370.. \uc77c\ub2e8 keyword\uac00 \uc0dd\uae34\uac78\ub85c\ub9cc \ubd10\uc11c\ub294 \uc0c1\uc218(immutable)\uc774\ub2e4. \uc2e4\uc81c\ub85c ES6\uc2a4\ud329 document(<a href=\"http:\/\/es6-features.org\/#Constants\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/es6-features.org\/#Constants<\/a>)\uc5d0\ub3c4\u00a0immutable\ub77c\uace0 \ud45c\ud604\ub418\uc5b4 \uc788\ub294\ub370, \uc774\uac8c \uc6d0\uc2dc\ud615 \ub370\uc774\ud130\ub97c \ud560\ub2f9\ud558\uba74 \ubcc0\uacbd \ubd88\uac00\ub2a5\uc778\ub370 \ucc38\uc870\ud615 \ub370\uc774\ud130\ub294 \ub610 \ubcc0\uacbd\uc774 \uac00\ub2a5\ud558\ub2e4.(<del>\uc774\ub7ec\uba74 \uc548\ub418\ub294\uac70 \uc544\ub2cc\uac00<\/del>) \ub610 \uc774\uac8c \ud06c\ub86c\uc758 \uacbd\uc6b0 Strict Mode \uc77c \uacbd\uc6b0 \uac12\uc744 \ubcc0\uacbd\ud558\uba74 \uc5d0\ub7ec \ub09c\ub2e4\uace0 \ud55c\ub2e4. (<del>\uc77c\uad04\uc131\uc5d0 \ub300\ud55c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\ub824\uace0 \ud558\ub294\uac70 \uc544\ub2c8\uc600\ub098?)<\/del><\/p>\n<p>var\uc640 \ub610 \ub2e4\ub978 let\uc758 \ucc28\uc774\uc810\uc740 loop index\uc5d0\uc11c \ucc3e\uc744 \uc218 \uc788\ub2e4.<\/p>\n<p>var\ub294 index\uc758 \uacbd\uc6b0 \ud560\ub2f9\ub41c \ubcc0\uc218 \ud558\ub098\uc5d0 \uac12\uc744 \ubcc0\uacbd \uc2dc\ucf1c \ub098\uac00\uc9c0\ub9cc let \uc744 loop index\ub85c \uc0ac\uc6a9\ud560 \uacbd\uc6b0 \uac01\uae30\ub2e4\ub978 \ubcc0\uc218\uac00 \uc0dd\uae34\ub2e4. (loop\uac00 \uba54\uc6b0 \ud070\uacbd\uc6b0 \uba54\ubaa8\ub9ac \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud560 \uc218 \uc788\ub294 \ubd80\ubd84 \uc544\ub2cc\uac00?)<\/p>\n<p>\uacb0\uad6d var\ubcf4\ub2e4\ub294 let\uacfc const\uc758 \ud2b9\uc9d5\uc744 \uc774\ud574\ud558\uace0 \ubc14\ub974\uac8c \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \uc911\uc694\ud560\ud150\ub370 \uc2e4\uc81c \ucf54\ub4dc\uc5d0\uc11c\ub294 let\ubcf4\ub2e4\ub294 const\uac00 \ub9ce\uc774 \uc0ac\uc6a9\ub41c\ub2e4\uace0 \ud55c\ub2e4.<\/p>\n<p>\ucc38\uace0 :\u00a0<a href=\"http:\/\/blog.javarouka.me\/2016\/03\/es2015-var-const-let.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/blog.javarouka.me\/2016\/03\/es2015-var-const-let.html<\/a>\u00a0,<\/p>\n<p><a href=\"http:\/\/blog.nekoromancer.kr\/2016\/01\/26\/es6-var-let-%EA%B7%B8%EB%A6%AC%EA%B3%A0-const\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/blog.nekoromancer.kr\/2016\/01\/26\/es6-var-let-%EA%B7%B8%EB%A6%AC%EA%B3%A0-const\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ES6(\ubd80\ub974\ub294 \uc6a9\uc5b4\uac00..\u00a0ECMAScript 6\ub77c\uace0 \ubd80\ub974\uae30\ub3c4\ud558\uace0,\u00a0ECMAScript 2015 , ES6 , \ubb50 \uc5ec\ud2bc) \uc5d0 \ub300\ud574 \ucc9c\ucc9c\ud788 \uacf5\ubd80\ud574\ubcf4\uc790 \uc77c\ub2e8 \ub0b4\uac00 \uc54c\ub358 Javascript \uc640 \ub2e4\ub978 \uccab\ubc88\uc9f8\ub294 \ubcc0\uc218 \uc120\uc5b8\uc5d0 \uad00\ud55c \ud0a4\uc6cc\ub4dc&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3],"tags":[13,20],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts\/330"}],"collection":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330"}],"version-history":[{"count":0,"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions"}],"wp:attachment":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}