JavaScript
-
ClassesJavaScript 2021. 12. 10. 11:30
JavaScript의 Class에 대한 개념 및 문법을 정리하기 위해 작성하였습니다. Classes are a tool to quickly produce similar objects and template for objects. To create a new instance of a class. It sets the property value for each instance. Example) class Dog { constructor(name) { this.name = name; this.behavior = 0; } } : By convention, we capitalize and CamelCase class names. : I..
-
Data typeJavaScript 2021. 10. 25. 09:33
이 글은 자바스크립트의 두 가지 데이터 타입에 관한 개념을 정리하기 위해 작성하였습니다. 변수에 할당될 때 메모리 상에 고정된 크기로 저장되고 해당 변수가 원시 데이터의 값을 보관하는 자료형. 1. 숫자(Number) 2. 불린(Boolean) 3. 문자열(String) 4. undefined 5. null 6. etc. 원시 자료형 변수 복사 : 각 변수 간에 원시 타입 데이터를 복사할 경우 데이터의 값이 복사됨. ex) var x = 100; var y = x; x = 99; y; // 100; 변수에 할당이 될 때 값이 직접 해당 변수에 저장되지 않고 변수에는 데이터에 대한 참조만 저장되는 ..
-
Higher-Order FunctionsJavaScript 2021. 10. 19. 19:38
이 글은 자바스크립트의 Higher-Order Functions(고차함수)에 관한 개념 및 문법을 정리하기 위해 작성하였습니다. We are often unaware of the number of assumptions we make when we communicate with other people in our native languages. If we told you to “count to three,” we would expect you to say or think the numbers one, two and three. We assumed you would know to start with “one” and end with “three”. With programming..
-
Objects (2)JavaScript 2021. 10. 17. 11:40
이 글은 자바스크립트의 Objects(객체)에 관한 개념 및 문법을 정리하기 위해 작성하였습니다. The this keyword refers to the calling object and which provides access to the calling object's properties. (calling object : object that a method belongs to) Method do not automatically have access to other internal properties of the calling object. ex) // Not use this keyword const robot = { model: 'A-13', provideName(..
-
Objects (1)JavaScript 2021. 10. 17. 00:22
이 글은 자바스크립트의 Objects(객체)에 관한 개념 및 문법을 정리하기 위해 작성하였습니다. We can use JavaScript objects to model real-world things, like a basketball, or we can use objects to build the data structures that make the web possible. JavaScript objects are containers storing related data and functionality. To create a Object. let object = { 'key' : value, key : value } Objects ..
-
LoopsJavaScript 2021. 10. 16. 15:49
이 글은 자바스크립트의 Loops(반복문)에 대한 개념 및 문법을 정리하기 위해 작성하였습니다. To repeat a set of instructions until a specified condition, called a stopping condigion is reached. Instead of writing out same code over and over, to repeat a given block of code on its own. for (let iterator-variable = 0; iterator-variable < 5; iterator-variable ++) { // code block } initialization : Starts the l..
-
ArraysJavaScript 2021. 10. 14. 18:04
이 글은 자바스크립트의 Array(배열)에 관한 개념 및 문법을 정리하기 위해 작성하였습니다. To organize and store data. You can think of array as List in real life. Arrays can store any data type (including strings, numbers, and booleans) To create an array. let Array = [element1, element2, element3 ...] The array is represented by square brackets : [ ] Each content item inside an array is called an ele..
-
ScopeJavaScript 2021. 10. 12. 10:44
이 글은 자바스크립트의 Scope에 관한 개념 및 문법을 정리하기 위해 작성하였습니다. Scope defines where variables can accessed or referenced. You can think of scope like the view of the night sky from your window. Everyone who lives on the planet Earth is in the global scope of the stars. The stars are accessible globally. Meanwhile, if you live in a city, you may see the city skyline or the river. The skyline and river..