{"id":91,"date":"2007-09-19T03:10:05","date_gmt":"2007-09-19T03:10:05","guid":{"rendered":"http:\/\/minicube.kr\/wp\/?p=91"},"modified":"2007-09-19T03:10:05","modified_gmt":"2007-09-19T03:10:05","slug":"study-javascript-variable","status":"publish","type":"post","link":"https:\/\/blog.neue.nz\/?p=91","title":{"rendered":"\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 &#8211; \ubcc0\uc218(variables)\uc5d0 \ub300\ud574\uc11c"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uc758 \ubcc0\uc218(variables)\uc5d0 \ub300\ud574 \uc774\uac83\uc800\uac83 \uacf5\ubd80\ud55c \uac83. \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8(ECMA262)\ub294 \uc6b0\uc120 Sun\uc758 <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.oracle.com\/technetwork\/java\/index.html\" target=\"_blank\">JAVA<\/a>\uc640\ub294 \uc804\ud600 \uc0c1\uad00\uc774 \uc5c6\ub2e4\ub294 \uac83\uc740 \ub2e4\ub4e4 \uc54c\uace0 \uc788\ub294 \uc0ac\uc2e4\uc774\uc8e0.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\uc790\ub8cc\ud615\uc758 \uc885\ub958 <\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>number<\/strong> : \uc22b\uc790\ub85c \ub41c \ub370\uc774\ud130. \uc22b\uc790, NaN(Not a Number), infinity(\ubc94\uc704 \ubc97\uc5b4\ub09c \uc22b\uc790) \ud615\ud0dc \uc911 \ud558\ub098.<\/li><li><strong>string<\/strong> : \ubb38\uc790 \ub370\uc774\ud130. &#8220;&#8221;(\uacb9\ub530\uc634\ud45c, \ub354\ube14\ucffc\ud14c\uc774\uc158)\uc73c\ub85c \ub458\ub7ec\uc2f8\uc778 \ud615\ud0dc. length() \uba54\uc18c\ub4dc\ub97c \uac00\uc9d0<\/li><li><strong>boolean<\/strong> : TRUE, FALSE \uc758 \ub450\uac00\uc9c0 \uac12 \uc874\uc7ac. \ucc38\uacfc \uac70\uc9d3, 0 \ub610\ub294 1\uc758 \uc758\ubbf8.<\/li><li><strong>object<\/strong> : new \ud0a4\uc6cc\ub4dc\ub85c \uc608\uc57d\ud55c \uac1d\uccb4, BOM or DOM, function, object, null<\/li><li><strong>undefined<\/strong> : \uc815\ud574\uc838 \uc788\uc9c0 \uc54a\uc740 \uac83, \ub610\ub294 \uc544\uc608 \uc5c6\ub294 \uac83.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">HTML\uc758 \ud3fc\uc5d0\uc11c input\uc73c\ub85c \ub4e4\uc5b4\uac00\ub294 \uac12\uc740 \uc804\ubd80 string\uc73c\ub85c \uc778\uc2dd\ud558\uae30 \ub54c\ubb38\uc5d0 \ub9cc\uc57d \uacc4\uc0b0\uc5d0 \ud544\uc694\ud55c \uc22b\uc790\ud615\uc774\ub77c\uba74 \ud615\ubcc0\ud658\uc744 \ud574\uc918\uc57c \ud569\ub2c8\ub2e4. \uc22b\uc790\ud615(number)\uc73c\ub85c \ud615\ubcc0\ud658\ud558\ub294 \ubc29\ubc95\uc740 Number(), parseInt(), parseFloat() \ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>parseInt()<\/code> \ud568\uc218\ub294 \uc228\uaca8\uc9c4 \ub450\ubc88\uc9f8 \uc778\uc790\uac00 \uc788\ub294\ub370, <code>parseInt(\"23\",16);<\/code> \ub4f1\uc73c\ub85c \ub450\ubc88\uc9f8 \uc778\uc790 \uac12\uc744 \uc22b\uc790\ub85c \ub123\uc5b4\uc8fc\uba74 \ud574\ub2f9 \uc9c4\uc218\ub85c \ubcc0\ud658\uc2dc\ucf1c \uc90d\ub2c8\ub2e4. \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc744 \ub54c\uc5d0 \uae30\ubcf8 \uac12\uc740 10\uc774\uba70 2, 8, 10, 16 \ub4f1\uc744 \uc0ac\uc6a9\uac00\ub2a5.<\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\ub610\ub294 \uc22b\uc790\ud615 \ub370\uc774\ud130\ub294 \uc55e\uc5d0 0\uc744 \ubd99\uc774\uba74 8\uc9c4\uc218, 0x\ub97c \ubd99\uc774\uba74 16\uc9c4\uc218\uac00 \ub41c\ub2e4.<br>a = 10; \/\/ 10\uc9c4\uc218 (10)<br>a = 010; \/\/ 8\uc9c4\uc218 (8)<br>a = 0x10; \/\/ 10\uc9c4\uc218 (16)<br>Number(), String() \ub4f1\uc758 \ud568\uc218\ub294 \uc774\ubbf8 \uc608\uc57d\ub418\uc5b4 \uc788\uc73c\uba70, \ud574\ub2f9 \ud615\uc73c\ub85c \ud615\ubcc0\ud658\ud558\ub294 \uae30\ub2a5\uc744 \ud568.<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\ud615\ubcc0\ud658<\/strong>\uc744 \uc798 \uc54c\uace0 \uc788\ub2e4\uba74 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uc758 \uc18c\uc2a4 \ubd84\uc11d\uc774 \uc6a9\uc774\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\ud615\ubcc0\ud658\ud558\uae30 <\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>String to Number : Number(), parseInt(), parseFloat()<\/li><li>Boolean to Number : false &#8211; 0, true &#8211; 1<\/li><li>Object to Number : valueOf, toString, NaN<\/li><li>String to Boolean : length=0 \uc774\ub77c\uba74 False, \uadf8\uc678\uc5d0 length&gt;0 \uc774\uba74 True<\/li><li>Number to Boolean : 0 \uc774\uba74 False, \uadf8\uc678\uc5d0 \ubaa8\ub4e0 \uacbd\uc6b0(\uc74c\uc218,\uc591\uc218 \ud3ec\ud568)\ub294 True<\/li><li>object = true<\/li><li>NULL, undefined = false<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ubaa8\ub4e0 \uc5f0\uc0b0\uc790\ub294 \uc22b\uc790\ub85c \ud615\ubcc0\ud658\ub418\uc5b4 \ucc98\ub9ac\ub418\uc9c0\ub9cc &#8220;+&#8221; \uc5f0\uc0b0\uc790\ub294 \uc608\uc678\uc785\ub2c8\ub2e4. &#8220;+&#8221; \ub294 \ubb38\uc790\uc5f4 \ubcd1\ud569 \uae30\ub2a5\ub3c4 \uac00\uc9c0\uace0 \uc788\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ub530\ub77c\uc11c &#8220;+&#8221; \uc5f0\uc0b0\uc790\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc5f0\uc0b0\ud560\ub54c \ud574\ub2f9 \ubcc0\uc218 \uc911 \ud558\ub098\ub77c\ub3c4 string\ud615\uc774\uba74 \ub098\uba38\uc9c0 \ubcc0\uc218\ub3c4 \ubaa8\ub450 string\ud615\uc73c\ub85c \uac15\uc81c \ud615\ubcc0\ud658\ub429\ub2c8\ub2e4. (String Append \ud604\uc0c1)<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>2 + true + &#8220;3&#8221; + false \ub97c \uc5f0\uc0b0\ud560 \ub54c. \uc21c\uc11c\ub300\ub85c \uacc4\uc0b0\ub418\uae30 \ub54c\ubb38\uc5d0 2+true\ub294 true\uac00 \uc22b\uc790\ud615\uc778 1\ub85c \ubc14\ub00c\uc5b4 3\uc774 \ub429\ub2c8\ub2e4.<br>3+&#8221;3&#8243; \uc740 string\ud615\uc774 \ud558\ub098 \uc874\uc7ac\ud558\uae30 \ub54c\ubb38\uc5d0 \ubaa8\ub450 string\ud615\uc73c\ub85c \ubc14\ub00c\uac8c \ub418\uc5b4 &#8220;33&#8221;\uc774 \ub429\ub2c8\ub2e4.<br>&#8220;33&#8221;+false \ub3c4 \uc5ed\uc2dc string\ud615\uc774 \uc874\uc7ac\ud558\ubbc0\ub85c \ucd5c\uc885 \uac12\uc740 &#8220;33false&#8221;<\/p><\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">\ubcc0\uc218 \uc120\uc5b8\ud558\uae30<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>\uc9c0\uc5ed\ubcc0\uc218<\/strong> : \ud568\uc218 \ub0b4\uc5d0\uc11c var \uc608\uc57d\uc5b4 \uc0ac\uc6a9. (\ud568\uc218 \ub0b4\uc5d0\uc11c\ub9cc \uc0ac\uc6a9\ud558\ub294 \ubcc4\ub3c4\uc758 \ubcc0\uc218 \uc0dd\uc131)<\/li><li><strong>\uc804\uc5ed\ubcc0\uc218<\/strong> : \ud568\uc218 \uc678\ubd80, \ub610\ub294 global area\uc5d0\uc11c var \uc608\uc57d\uc5b4 \uc0ac\uc6a9\ud558\uac70\ub098, \uadf8\ub0e5 \ubcc0\uc218\ub97c \ub9cc\ub4e4\uba74 \ubb38\uc11c \ub0b4\uc5d0\uc11c \uacc4\uc18d \uc0ac\uc6a9\uac00\ub2a5.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\ubcc0\uc218\uba85 \uaddc\uce59<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>\uc601\ubb38\uc790, \uc22b\uc790, _(\ubc11\uc904) \uc0ac\uc6a9 \uac00\ub2a5. \ubcc0\uc218\uba85\uc758 \uccab \ubb38\uc790\ub294 \uc601\ubb38\uc73c\ub85c \uc2dc\uc791.<\/li><li>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc608\uc57d\uc5b4\ub294 \uc0ac\uc6a9\ubd88\uac00\ub2a5. (var, this, if \ub4f1)<\/li><li>\ud55c\uae00 \ubcc0\uc218\uba85\uc740 \uc6d0\ub798 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc5c8\uc9c0\ub9cc, \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ub0b4\uc758 string\uc740 \uc720\ub2c8\ucf54\ub4dc\ub85c \ucc98\ub9ac\ub418\uae30 \ub54c\ubb38\uc5d0 \ud604\uc7ac\ub294 \ud55c\uae00 \ubcc0\uc218\uba85\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. (\ub2e4\ub9cc \uc601\ubb38 \ubcc0\uc218\uba85 \uad8c\uc7a5)<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uc758 \ubcc0\uc218(variables)\uc5d0 \ub300\ud574 \uc774\uac83\uc800\uac83 \uacf5\ubd80\ud55c \uac83. \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8(ECMA262)\ub294 \uc6b0\uc120 Sun\uc758 JAVA\uc640\ub294 \uc804\ud600 \uc0c1\uad00\uc774 \uc5c6\ub2e4\ub294 \uac83\uc740 \ub2e4\ub4e4 \uc54c\uace0 \uc788\ub294 \uc0ac\uc2e4\uc774\uc8e0. \uc790\ub8cc\ud615\uc758 \uc885\ub958 number : \uc22b\uc790\ub85c \ub41c \ub370\uc774\ud130. \uc22b\uc790, NaN(Not a Number), infinity(\ubc94\uc704 \ubc97\uc5b4\ub09c \uc22b\uc790) \ud615\ud0dc \uc911 \ud558\ub098. string : \ubb38\uc790 \ub370\uc774\ud130. &#8220;&#8221;(\uacb9\ub530\uc634\ud45c, \ub354\ube14\ucffc\ud14c\uc774\uc158)\uc73c\ub85c \ub458\ub7ec\uc2f8\uc778 \ud615\ud0dc. length() \uba54\uc18c\ub4dc\ub97c \uac00\uc9d0 boolean : TRUE, FALSE \uc758 \ub450\uac00\uc9c0 \uac12 \uc874\uc7ac. \ucc38\uacfc [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[88,132],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-java-script","tag-variable"],"_links":{"self":[{"href":"https:\/\/blog.neue.nz\/index.php?rest_route=\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.neue.nz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.neue.nz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.neue.nz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.neue.nz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":0,"href":"https:\/\/blog.neue.nz\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.neue.nz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.neue.nz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.neue.nz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}