๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

JavaScript

(8)
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - Function Declarations vs. Function Expressions GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ๋‘ ๋ฒˆ์งธ์ธ ๊ธฐ๋ณธํ˜•๊ณผ ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Mandeep Singh ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  Function Declarations vs. Function Expressions ์ด๋‹ค. ๋‚ด์šฉ ์ค‘๊ฐ„ ์ค‘๊ฐ„ ๐Ÿค”..
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - JavaScript Functions — Understanding The Basics GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ์—ฌ์„ฏ ๋ฒˆ์งธ์ธ Function Scope, Block Scope and Lexical Scope์™€ ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Brandon Morelli ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  JavaScript Funct..
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - JavaScript Double Equals vs. Triple Equals GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ๋‹ค์„ฏ ๋ฒˆ์งธ์ธ == vs === vs typeof์™€ ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Brandon Morelli ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  JavaScript — Double Equals vs. Triple Equa..
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - Javascript Coercion Explained GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ๋„ค ๋ฒˆ์งธ์ธ Implicit, Explicit, Nominal, Structuring and Duck Typing๊ณผ ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Ben Garrison ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  Javascrip..
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - Explaining Value vs. Reference in Javascript GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ์„ธ ๋ฒˆ์งธ์ธ ๊ธฐ๋ณธํ˜•๊ณผ ์ฐธ์กฐํ˜•(Value Types and Reference Types)์— ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Arnav Aggarwal ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  Explaining Value vs. R..
[๋‚ด๋ณด๋‚ด๋ฒˆ] JavaScript - The Secret Life of JavaScript Primitives GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์˜ ๋‚ด์šฉ ์ค‘ ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ์€ ์•„ํ‹ฐํด์„ ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ์ž‘์„ฑํ•˜๋Š” ๋ฒˆ์—ญ๊ธ€์ด๋‹ค. 33๊ฐ€์ง€ ์ค‘ ๋‘ ๋ฒˆ์งธ์ธ ๊ธฐ๋ณธํ˜•๊ณผ ๊ด€๋ จ๋œ ๋‚ด์šฉ์ด๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ Angus Croll ๋‹˜์ด ์ž‘์„ฑํ•˜์‹  The Secret Life of JavaScript Primitives ์ด๋‹ค. ์•„ํ‹ฐํด ๋‚ด์šฉ์„ ํ›‘์–ด๋ดค์„ ๋•Œ ์ œ๋Œ€๋กœ..
[๋‚ด๋ณด๋‚ด๋ฒˆ] Javascript - The Ultimate Guide to Hoisting, Scopes, and Closures in JavaScript 2021.04.06 - [JavaScript] - [๋‚ด๋ณด๋‚ด๋ฒˆ] Javascript: What Is The Execution Context? What Is The Call Stack? [๋‚ด๋ณด๋‚ด๋ฒˆ] Javascript: What Is The Execution Context? What Is The Call Stack? ์–ผ๋งˆ ์ „ GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์•Œ๊ฒŒ ๋˜์—ˆ๋‹ค. ๋ชจ๋‘ ๋ช…ํ™•ํ•˜๊ฒŒ ์•Œ์•„์•ผ ํ•  ๊ฐœ๋…๋“ค์ธ๋ฐ ๋ชจ๋ฅด๋Š” ๊ฒƒ๋„ ๋งŽ๊ณ , ์„ค๋ช…ํ•ด๋ณด๋ผ๊ณ  ํ•ด๋„ ๋ชปํ•  ๋‚ด์šฉ๋“ค์ด ๋„ˆ๋ฌด ๋งŽ birdmee.tistory.com ์œ„์˜ ๊ธ€์— ์„œ๋‘์—์„œ๋„ ์–ธ๊ธ‰ํ–ˆ๋‹ค์‹œํ”ผ, GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Dev..
[๋‚ด๋ณด๋‚ด๋ฒˆ] Javascript: What Is The Execution Context? What Is The Call Stack? ์–ผ๋งˆ ์ „ GitHub์— ์žˆ๋Š” 33 Concepts Every JavaScript Developer Should Know ๋ผ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์•Œ๊ฒŒ ๋˜์—ˆ๋‹ค. ๋ชจ๋‘ ๋ช…ํ™•ํ•˜๊ฒŒ ์•Œ์•„์•ผ ํ•  ๊ฐœ๋…๋“ค์ธ๋ฐ ๋ชจ๋ฅด๋Š” ๊ฒƒ๋„ ๋งŽ๊ณ , ์„ค๋ช…ํ•ด๋ณด๋ผ๊ณ  ํ•ด๋„ ๋ชปํ•  ๋‚ด์šฉ๋“ค์ด ๋„ˆ๋ฌด ๋งŽ์•„์„œ ์กฐ๊ธˆ์”ฉ ๊ณต๋ถ€ํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค. ๊ทธ์ค‘ ์ฒซ ๋ฒˆ์งธ ํ˜ธ์ถœ ์Šคํƒ๊ณผ ๊ด€๋ จ๋œ ๋‚ด์šฉ์—์„œ ๋ช‡ ๊ฐ€์ง€ ์•„ํ‹ฐํด์„ ์ฝ์–ด๋ณด์•˜๊ณ  ๋‚ด๊ฐ€ ์ •๋ฆฌํ•  ๊ฒธ ๊ธฐ์–ตํ•  ๊ฒธ ๋ฒˆ์—ญ๊ธ€์„ ์ž‘์„ฑํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค. โ€ป ๋‚ด๋ณด๋‚ด๋ฒˆ(๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋‚ด๊ฐ€ ๋ฒˆ์—ญํ•œ): ์˜์–ด ์ „๊ณต์ž๋„ ํ•ด์™ธ ์œ ํ•™ํŒŒ๋„ ์•„๋‹ˆ๊ธฐ์— ๋ฒˆ์—ญ์—๋Š” ์˜์—ญ, ์˜ค์—ญ, ๊ตฌ๊ธ€ ๋ฒˆ์—ญ์ด ๋ฌด์ˆ˜ํžˆ ๋งŽ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์˜คํƒ€๋„ ๋งŽ์„ ์ˆ˜ ์žˆ๋‹ค. ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ์›๋ฌธ์„ ์ง์ ‘ ์‚ดํŽด๋ณด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ •๋ณด๋“ค์„ ๋” ์ฐพ์•„๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค. (ํ•˜์ง€๋งŒ ๋Œ“๊ธ€ ํ”ผ๋“œ๋ฐฑ๋„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค๐Ÿ˜ƒ ) ์ด๋ฒˆ์— ๊ณ ๋ฅธ ์•„ํ‹ฐํด์€ V..