{"id":16931,"date":"2026-07-17T10:12:26","date_gmt":"2026-07-17T01:12:26","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=16931"},"modified":"2026-07-17T10:15:29","modified_gmt":"2026-07-17T01:15:29","slug":"%ec%98%a4%eb%b2%84%eb%a1%9c%eb%93%9c-%ec%8b%9c%ea%b7%b8%eb%8b%88%ec%b3%90-or-%ec%a0%9c%eb%84%a4%eb%a6%ad-%ed%95%a8%ec%88%98","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=16931","title":{"rendered":"\uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0 vs \uc81c\ub124\ub9ad \ud568\uc218"},"content":{"rendered":"<p>Typescript\uc5d0\uc11c \ud568\uc218 \ud638\ucd9c \uc2dc \uadf8 \ud0c0\uc785\uc744 \uc5c4\uaca9\ud558\uac8c \uc81c\uacf5\ud558\uae30 \uc704\ud55c 2\uac00\uc9c0 \ubc29\uc2dd\uc73c\ub85c \ub3d9\uc77c \uc0ac\ub840\ub97c \uc608\ub85c \ub4e4\uc5b4\ubcf4\uba74..<\/p>\n<p>\uba3c\uc800 \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0\uc758 \uacbd\uc6b0\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"typescript\">\r\nfunction len(s: string): number; \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0\r\nfunction len(arr: any[]): number; \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0\r\nfunction len(x: any): number { \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0\r\n  return x.length;\r\n}\r\n<\/pre>\n<p>\uac19\uc740 \uae30\ub2a5\uc73c\ub85c\uc368\uc758 \uc81c\ub124\ub9ad \ud568\uc218 \ubc29\uc2dd\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"typescript\">\r\nfunction len&lt;T extends { length: number }>(x: T) {\r\n  return x.length;\r\n}\r\n<\/pre>\n<p>\ud558\uc9c0\ub9cc \uc704\uc640 \uac19\uc740 \uc0ac\ub840\uc758 \uacbd\uc6b0\ub294 \uac04\ub2e8\ud788 \uc720\ub2c8\uc5b8 \ud0c0\uc785\uc73c\ub85c \ud574\uacb0\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"typescript\">\r\nfunction len(x: any[] | string) {\r\n  return x.length;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Typescript\uc5d0\uc11c \ud568\uc218 \ud638\ucd9c \uc2dc \uadf8 \ud0c0\uc785\uc744 \uc5c4\uaca9\ud558\uac8c \uc81c\uacf5\ud558\uae30 \uc704\ud55c 2\uac00\uc9c0 \ubc29\uc2dd\uc73c\ub85c \ub3d9\uc77c \uc0ac\ub840\ub97c \uc608\ub85c \ub4e4\uc5b4\ubcf4\uba74.. \uba3c\uc800 \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0\uc758 \uacbd\uc6b0\uc785\ub2c8\ub2e4. function len(s: string): number; \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0 function len(arr: any[]): number; \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0 function len(x: any): number { \/\/ \uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0 return x.length; } \uac19\uc740 \uae30\ub2a5\uc73c\ub85c\uc368\uc758 \uc81c\ub124\ub9ad \ud568\uc218 \ubc29\uc2dd\uc785\ub2c8\ub2e4. function len&lt;T extends { length: number &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=16931\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\uc624\ubc84\ub85c\ub4dc \uc2dc\uadf8\ub2c8\uccd0 vs \uc81c\ub124\ub9ad \ud568\uc218&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[157],"tags":[],"class_list":["post-16931","post","type-post","status-publish","format-standard","hentry","category-typescript"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16931"}],"version-history":[{"count":6,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16931\/revisions"}],"predecessor-version":[{"id":16938,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16931\/revisions\/16938"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16931"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}