{"id":1091,"date":"2022-02-17T19:26:11","date_gmt":"2022-02-17T10:26:11","guid":{"rendered":"http:\/\/mylittleforest.kr\/wordpress\/?p=1091"},"modified":"2022-02-17T19:50:14","modified_gmt":"2022-02-17T10:50:14","slug":"%ec%9e%90%eb%b0%94%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8-%ed%95%a8%ec%88%98","status":"publish","type":"post","link":"http:\/\/mylittleforest.kr\/wordpress\/blog\/2022\/02\/17\/1091\/","title":{"rendered":"\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218"},"content":{"rendered":"\n<h2>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218<\/h2>\n\n\n\n<h3>\ud568\uc218 \uc815\uc758<\/h3>\n\n\n\n<ul><li>\ud2b9\uc815 \uae30\ub2a5\uc744 \ud558\ub294 \uad6c\ubb38(\uc54c\uace0\ub9ac\uc998,\ub85c\uc9c1)\uc744 \ub3c5\ub9bd\ub41c \ud615\ud0dc\ub85c \ub9cc\ub4dc\ub294 \uac83<\/li><li>\ubcc0\uc218\uc5d0 \uc800\uc7a5\ud560 \uc218 \uc788\ub294 \ud55c\uac00\uc9c0 \uc790\ub8cc\ud615<\/li><li>\ud568\uc218 \uad6c\uc870 \ud615\uc2dd : <strong>var {\ud568\uc218\uba85}=function(){\/\/\uc800\uc7a5\ud560 \ucf54\ub4dc }<\/strong><\/li><li>\ucd95\uc57d \ud615\uc2dd : <strong>function{\ud568\uc218\uba85}(){\/\/\uc800\uc7a5\ud560 \ucf54\ub4dc }<\/strong><\/li><li>\ud568\uc218 \uc2e4\ud589 : <strong>{\ud568\uc218\uba85}()<\/strong><\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar sayHello = function () {\n  console.log('Hello~');\n}\nsayHello();\n\n\/\/ \uac19\uc740 \ucf54\ub4dc\nfunction sayHello() {\n  console.log('Hello~');\n}\n<\/pre><\/div>\n\n\n<h3>\ud568\uc218\uc5d0 \uac12 \uc804\ub2ec\ud558\uae30<\/h3>\n\n\n\n<ul><li>\ud568\uc218\uc5d0 \uc800\uc7a5\ub41c \ucf54\ub4dc\ub97c \uc2e4\ud589\ud560 \ub54c \uac12\uc744 \uc804\ub2ec\ud560 \uc218 \uc788\uc74c<\/li><li>\ub9e4\uac1c\ubcc0\uc218 \uc0ac\uc6a9 \ud568\uc218 \ud615\uc2dd : <strong>function{\ud568\uc218\uba85}(\uac121,\uac122,\u2026){}<\/strong><\/li><li>\uac121,\uac122,\u2026\ub9e4\uac1c\ubcc0\uc218\ub77c\uace0 \ud568<\/li><li>\ucf54\ub4dc \ube14\ub7ed \uc548\uc5d0\uc11c \uc804\ub2ec \ubc1b\uc740 \uac12 \uc0ac\uc6a9 \uac00\ub2a5<\/li><li>\ud568\uc218\uc5d0 \uc804\ub2ec\ud558\ub294 \uac12\uc744 \ud568\uc218 \uc778\uc790\ub77c\uace0 \ud568<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction square(x) {\n  console.log(x * x);\n}\nsquare(2);\nsquare(0.1);\n<\/pre><\/div>\n\n\n<h3>\uac12\uc744 \ubc18\ud658\ud558\ub294 \ud568\uc218<\/h3>\n\n\n\n<ul><li>\ud568\uc218\uc758 \uc2e4\ud589 \uacb0\uacfc\ub97c \ubc18\ud658<\/li><li>\ud568\uc218 \ucf54\ub4dc \ube14\ub85d \uc548\uc5d0\uc11c <strong>return{\uac12}<\/strong> \ud615\uc2dd \uc0ac\uc6a9<\/li><li>\ubc18\ud658\ub41c \uac12\uc740 \ub2e4\ub978 \ud45c\ud604\uc2dd\ub4e4\uacfc \uac19\uc740 \ucde8\uae09<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction square(x) {\n  return x * x;\n}\nvar vaule = square(4);\n<\/pre><\/div>\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0501-function-1.html\">0501-function-1<\/a><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0501-function-1.html\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n\n\n\n<h2>\ud568\uc218\ub97c \uc778\uc790\ub85c \uc804\ub2ec\ubc1b\ub294 \ud568\uc218<\/h2>\n\n\n\n<ul><li>\ud568\uc218\uc758 \uc778\uc790\ub85c \ud568\uc218\uba85\uc744 \uc804\ub2ec<\/li><li>\ud568\uc218 \ub0b4\ubd80\uc5d0\uc11c \uc804\ub2ec\ubc1b\uc740 \ud568\uc218\ub97c \uc2e4\ud589<\/li><li>ex) setInterval(tick, 1000);<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction operator(x, y, func) {\n  return func(x, y);\n}\n\nfunction add(a, b) { return a+b; }\nfunction substract(a, b) { return a-b; }\n\nconsole.log(operator(4, 2, add));\nconsole.log(operator(4, 2, substract));\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n&lt;script&gt;\n  var element = document.getElementById(&quot;text&quot;);\n\n  setTimeout(function() {\n    element.innerText = '\uc0ad\uc81c\ub428';\n  }, 3000);      \n&lt;\/script&gt;\n<\/pre><\/div>\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0502-function-2.html\">0502-function-2<\/a><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0502-function-2.html\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n\n\n\n<h3>\ubc30\uc5f4 \uac1d\uccb4\uc758 \ud568\uc218<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><thead><tr><td class=\"has-text-align-left\" data-align=\"left\">\uace0\uac31<\/td><td class=\"has-text-align-left\" data-align=\"left\">\uace0\ud750<\/td><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">\uac81<\/td><td class=\"has-text-align-left\" data-align=\"left\">\ubb34\ubaa8\ud568<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\uc778\uc0c9\ud568<\/td><td class=\"has-text-align-left\" data-align=\"left\">\ub0ad\ube44<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\uaca9\ubd84<\/td><td class=\"has-text-align-left\" data-align=\"left\">\uc90f\ub300\uc5c6\uc74c<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\ucd0c\uc2a4\ub7ec\uc6c0<\/td><td class=\"has-text-align-left\" data-align=\"left\">\uc775\uc0b4<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">\ubb34\ub69d\ub69d\ud568<\/td><td class=\"has-text-align-left\" data-align=\"left\">\uc544\ubd80<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar balls = &#x5B;'\ucd95\uad6c\uacf5', '\uc57c\uad6c\uacf5', '\ubc30\uad6c\uacf5', '\ub18d\uad6c\uacf5'];\nballs.forEach(throwBall);\n\nfunction throwBall(ball) {\n  console.log(ball + '\uc744(\ub97c) \ub358\uc84c\uc2b5\ub2c8\ub2e4.')\n};\n\nvar numbers = &#x5B;1, 2, 3, 4, 5];\nvar twice = numbers.map(function(value, index) {\n  return value*2;\n});\nconsole.log(twice);\n\nvar even = numbers.filter(function(value, index) {\n  return value % 2 == 0;\n});\nconsole.log(even);\n<\/pre><\/div>\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0503-function-3.html\">0503-function-3<\/a><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0503-function-3.html\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n\n\n\n<h3>\uc774\ubca4\ud2b8<\/h3>\n\n\n\n<h4>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc774\ubca4\ud2b8<\/h4>\n\n\n\n<ul><li>\uc0ac\uc6a9\uc790\uc758 \uc785\ub825\uc744 \ucc98\ub9ac<\/li><li>HTML\ud0dc\uadf8 \ub9c8\ub2e4 \ub2e4\uc591\ud55c \uc774\ubca4\ud2b8\uac00 \ubc1c\uc0dd\ub428<\/li><li><strong>click, focus, blur<\/strong> \ub4f1<\/li><li>\uc774\ubca4\ud2b8 \ucc98\ub9ac\uae30\ub294 \uc774\ubca4\ud2b8 \ubc1c\uc0dd \uc2dc \uc2e4\ud589\ud560 \ud568\uc218\ub97c \uc804\ub2ec\ubc1b\uc74c<\/li><\/ul>\n\n\n\n<h4>\uc774\ubca4\ud2b8 \ucc98\ub9ac\uae30 \ub4f1\ub85d<\/h4>\n\n\n\n<ul><li>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\ub85c html\uc694\uc18c\ub97c \uc120\ud0dd\ud55c \ub4a4 addEventListener \ud568\uc218\ub97c \ud638\ucd9c<\/li><li>\ud615\uc2dd : addEventListner(\uc774\ubca4\ud2b8\uc774\ub984, \uc2e4\ud589\ud560 \ud568\uc218)<ul><li>\uccab \ubc88\uc9f8 \uc778\uc790-\uc774\ubca4\ud2b8\uc758 \uc774\ub984<\/li><li>\ub450 \ubc88\uc9f8 \uc778\uc790-\uc774\ubca4\ud2b8\uac00 \ubc1c\uc0dd\ud588\uc744 \ub54c \uc2e4\ud589\ud560 \ud568\uc218<\/li><\/ul><\/li><\/ul>\n\n\n\n<h4>Click\uc774\ubca4\ud2b8<\/h4>\n\n\n\n<ul><li>HTML \uc694\uc18c\ub97c \ub9c8\uc6b0\uc2a4\ub85c \ud074\ub9ad\ud558\uac70\ub098 \ud130\uce58 \ub514\ubc14\uc774\uc2a4\uc5d0\uc11c \ud130\uce58\uc2dc \ubc1c\uc0dd<\/li><li>\ub9c8\uc6b0\uc2a4 \uc774\ubca4\ud2b8 \uc911 \ud558\ub098\ub85c mousedown, mouseup \uc774\ubca4\ud2b8 \ubc1c\uc0dd \ud6c4\uc5d0 \ubc1c\uc0dd\ub428<\/li><li>\ubc84\ud2bc \ubfd0\ub9cc \uc544\ub2c8\ub77c \ubaa8\ub4e0 HTML\uc694\uc18c\uc5d0\uc11c \uc774\ubca4\ud2b8\uac00 \ubc1c\uc0dd\ub418\uace0 \uc774\ubca4\ud2b8 \ucc98\ub9ac\uae30\ub97c \ub4f1\ub85d\ud560 \uc218 \uc788\uc74c<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar button = document.getElementById(&quot;button&quot;);\nvar element = document.getElementById(&quot;count&quot;);\n\nvar count = 0;\nbutton.addEventListener('click', function() {\n  count++;\n  element.innerText = count + '\ud68c \ud074\ub9ad';\n});\n<\/pre><\/div>\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0504-function-4.html\">0504-function-4<\/a><a href=\"http:\/\/mylittleforest.kr\/wordpress\/wp-content\/uploads\/2022\/02\/0504-function-4.html\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218 \ud568\uc218 \uc815\uc758 \ud2b9\uc815 \uae30\ub2a5\uc744 \ud558\ub294 \uad6c\ubb38(\uc54c\uace0\ub9ac\uc998,\ub85c\uc9c1)\uc744 \ub3c5\ub9bd\ub41c \ud615\ud0dc\ub85c \ub9cc\ub4dc\ub294 \uac83 \ubcc0\uc218\uc5d0 \uc800\uc7a5\ud560 \uc218 \uc788\ub294 \ud55c\uac00\uc9c0 \uc790\ub8cc\ud615 \ud568\uc218 \uad6c\uc870 \ud615\uc2dd : var {\ud568\uc218\uba85}=function(){\/\/\uc800\uc7a5\ud560 \ucf54\ub4dc } \ucd95\uc57d \ud615\uc2dd : function{\ud568\uc218\uba85}(){\/\/\uc800\uc7a5\ud560 \ucf54\ub4dc } \ud568\uc218 \uc2e4\ud589 : {\ud568\uc218\uba85}() \ud568\uc218\uc5d0 \uac12 \uc804\ub2ec\ud558\uae30 \ud568\uc218\uc5d0 \uc800\uc7a5\ub41c \ucf54\ub4dc\ub97c \uc2e4\ud589\ud560 \ub54c \uac12\uc744 \uc804\ub2ec\ud560 \uc218 \uc788\uc74c \ub9e4\uac1c\ubcc0\uc218 \uc0ac\uc6a9 \ud568\uc218 \ud615\uc2dd : function{\ud568\uc218\uba85}(\uac121,\uac122,\u2026){} \uac121,\uac122,\u2026\ub9e4\uac1c\ubcc0\uc218\ub77c\uace0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[38],"tags":[],"_links":{"self":[{"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1091"}],"collection":[{"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=1091"}],"version-history":[{"count":6,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1091\/revisions"}],"predecessor-version":[{"id":1110,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1091\/revisions\/1110"}],"wp:attachment":[{"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=1091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=1091"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mylittleforest.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}