Prototype 자바스크립트에는 Prototype Link와 Prototype Object가 존재한다. 이를 통들어 Prototype이라고 한다. Prototype Object function Dog() {}; // 함수 var dogObj = new Dog(); // 함수로 객체를 생성 var obj = {}; // var obj = new Object(); 객체는 언제나 함수로 생성된다. 함수가 정의되면 Constructor 자격이 생긴다 Constructor 자격이 있어야만 new operator를 통해 객체를 만들어낼 수 있다. new는 함수만 쓸 수 있다. (즉 함수 -> Constructor -> new를 통해 객체 생성 가능) 함수가 정의되면 Prototype Object도 같이 생긴다.생..
To-DofreeCodeCamp - 프로토타입 복습- functional Programming 5문제 이상Udemy Java- 나머지 코딩 연습- control flow 들어가기Udemy JS- Command Line까지 Today was...학교 가서 공부했더니 더웠다Method Overloading을 배웠다!js 강의는 언제 듣지....... Do-Tomorrow우아한테크코스 온라인 데모테스트 해보기Java Control Flow freeCodeCamp Functional Programming 끝내기
Code Exercise package com.Hazel; public class Main { public static void main(String[] args) { int score = 1500; int scorePosition = calculateHighScorePosition(score); displayHighScorePosition("Hazel", scorePosition); score = 900; scorePosition = calculateHighScorePosition(score); displayHighScorePosition("Ryan", scorePosition); score = 400; scorePosition = calculateHighScorePosition(score); disp..
Refactor Global Variables Out of Function1) Don't alter a variable or object - create new variables and objects and return them if need be from a function. 2) Declare function arguments - any computation inside a function depends only on the arguments, and not on any global object or variable. So far, we have seen two distinct principles for functional programming: Use the map Method to Extract ..
문제 You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments. 예시 destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1]. destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3) should return [1, 5, 1]. destroyer([3, 5, 1, 2, 2], 2, 3, 5) should return [1]...
To-DoUdemy JAVA 강좌 듣기- 29. More On Methods And a Challenge- 30. Method Challenge- 31. Diffmerge Tool Intro- 32. Install DiffMerge- 33. Using DiffMerge- 34. Coding Exercise- 35. Coding Exercise ex part 1- 36. Coding Exercise ex part 2- 37. Coding Exercise ex part 3- 38. Method overloading - 39. Method overloading recap- 40. Seconds and Minute Challenge- 41. Bounus Challenge Sol - 코딩연습 1 ~ 11코딩연습 ..
Expressions package com.Hazel; public class Main { public static void main(String[] args) { int score = 100; // score에서 100까지가 exp if(score > 99) { System.out.println("You got the high score!"); score = 0; } } } data type과 ;을 제외한 부분이 expression이다. brace와 bracket 안은 expression이다. if, brace와 bracket은 expression이 아니다. score = 0는 expression이다. package com.Hazel; public class Main { public static voi..
Functional Programming TerminologyThe functions that take a function as an argument, or return a function as a return value are called higher orderfunctions. When the functions are passed in to another function or returned from another function, then those functions which gets passed in or returned can be called a lambda. Functions that can be assigned to a variable, passed into another function..
To-DoUdemy JAVA 강좌 듣기- 18. Getting to know primitive types(Float and Double)- 19. Getting to know primitive types(Char and Boolean)- 20. Uderstanding Strings and Finishing up primitive types- 21. Operators in Java- 22. More on Operators and Operator Precedence- 23. Java Tutorial Intro- 24. Keywords and Expressions- 25. Statements, Whitespace and Indentation(Code organization)- 26. Code Blocks an..
Int, Byte, Short, Long package com.Hazel; public class Main { public static void main(String[] args) { // int has a width of 32 int myMinValue = -2_147_483_648; int myMaxValue = 2_147_483_647; // byte has a width of 8 byte myMinByteValue = -128; byte myMaxByteValue = 127; // short has a width of 16 short myMinShortValue = -32_768; short myMaxShortValue = 32_767; // long has a width of 64 long my..
A more efficient way is to set the prototypeto a new objectAdd the property numLegsand the two methods eat()and describe()to the prototypeof Dogby setting the prototypeto a new object.There is one crucial side effect of manually setting the prototypeto a new object. It erased the constructorproperty! To fix this, whenever a prototype is manually set to a new object, remember to define the constr..
To-DoUdemy JAVA 강좌 듣기- 13. First steps - creating your first Java program- 14. Exploring IntelliJ IDEA- 15. Variables, Datatypes and Operators Intro- 16. What are Variables?- 17. Getting to know primitive types(Byte, Short, Int and long)- 18. Getting to know primitive types(Float and Double)- 19. Getting to know primitive types(Char and Boolean)- 20. Uderstanding Strings and Finishing up primiti..
ES7 'Helloooo'.includes('o'); // true const pets = ['cat', 'dog']; pets.includes('cat'); // true const sqaure = (x) => x**2 square(2); // 4 square(5); // 25 const cube = (x) => x**3 cube(3); // 27 ES8 .padStart() .padEnd() 'Turtle'.padStart(10); // " Turtle" 합쳐서 total 10 스페이스 'Turtle'.padEnd(10); // "Turtle " 합쳐서 total 10 스페이스 const fun = (a,b,c,d,) => { console.log(a); } fun(1,2,3,4,); // print..
let arr = [1, 2, 3, 4, 5]; let copyArr = [].concat(arr); arr[0] = 0; console.log(copyArr[0]) // 1(바뀌지 않음) primitive type이 immutable한 것은, 복사해오기 때문이다. 따라서 복사본을 수정해도 원본은 그대로 남아있게 된다. 반면 object, array는 단순히 복사하는 것이 아니라 주소를 참조하기 때문에 원본도 바뀌게 된다. 바뀌지 않게 하려면 primitve type이 하듯이 복사하는 방법을 사용한다. Shallow Copy let obj = {a: 1, b: 2, c: 3}; let clone = Object.assign({}, obj); let clone2 = {...obj}; obj.c = 5; c..
- Total
- Today
- Yesterday
- 개발 공부
- linkedlist
- package.json
- GIT
- til
- Conflict
- 인스턴스
- Java
- jQuery
- rxjs
- Data Structure
- JavaScript
- 포인터 변수
- 알고리즘
- SQL
- 리덕스
- youtube data api
- useEffect
- 제네릭스
- oracle
- 깃
- Redux
- CSS
- this
- c언어
- Prefix Sums
- Session
- react
- 자바
- getter
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |