비동기 호출
·
BootCamp_Codestates/Pre Tech Blog
동기 호출 예시 function waitSync(ms) { var start = Date.now(); var now = start; while(now - start < ms) { now = Date.now(); } } // 현재 시각과 시작 시각을 비교하여 ms 범위 내에서 무한 루프를 도는 blocking 함수 function drink(person, coffee) { console.log(person + '는 ' + coffee + '를 마십니다') } function orderCoffeeSync(coffee) { console.log(coffee + '가 접수되었습니다'); waitSync(2000); //2초동안 blocking 시킨다..!!! return coffee; } let customer..
spread syntax VS rest parameter
·
BootCamp_Codestates/Pre Tech Blog
spread syntax 란? 전개 구문(Spread Syntax)는 ECMAScript6(2015)에서 새로 추가된 문법으로 간단하게 이 문법은 문법 이름 그대로 객체 혹은 배열들을 펼칠 수 있게 해 줍니다. 1. 펼칠 대상이 객체인 경우 const myObject1 = { laptop: 'MacBook Pro', tablet: 'iPad Pro 11' } const myObject2 = {...myObject1}; console.log(myObject1); // {laptop: "MacBook Pro", tablet: "iPad Pro 11"} console.log(myObject2); // {laptop: "MacBook Pro", tablet: "iPad Pro 11"} console.log(my..
TIL - 20201119
·
BootCamp_Codestates/TIL
오늘 한일 페어와 함께 stringifyJSON, TreeUI 스프린트 진행 학습내용 및 성취 재귀함수 활용법과 stringify 함수의 용도에 대해 학습했다. 느낀점 1. 배열과 객체 데이터를 자유롭게 접근하고 수정하고 원하는 형태로 바꾸는 방법을 잘 모른다. 2. null undefined 등 타입에 대한 개념을 정확히 알고 있지 않다. 3. 배열에 쓸수 있는, 객체에 쓸 수 있는, DOM 에서 쓸 수 있는 등등.. 각 상황에 필요한 함수 활용법숙지가 필요하다. 4. 배열 안의 요소가 될 수 있는 타입, 객체의 값이 될 수 있는 타입을 정확히 알아야. 5. 자바스크립트 객체와 JSON은 대표적인 트리구조를 가졌다????? 코드를 짤 때, 파악을 먼저 할 것. 달려들지 말것.
TIL - 20201118
·
BootCamp_Codestates/TIL
오늘 한일 proceed underbar sprint with pair. completed Part 2. (way too difficult...) 학습내용 및 성취 It was valuable time to understand how the most used functions(built in methods) are structured. Anyway, i reached the end of this sprint. But, thorough review is always inevitable. 느낀점 I... really wanna be good at logical thinking. I hope to widen my perspective thus i can come up with intuitive but logi..
TIL - 20201117
·
BootCamp_Codestates/TIL
오늘 한일 proceed underbar sprint with pair. completed part1. 학습내용 및 성취 it was valuable time to understand how the most used functions(built in methods) are structured. 느낀점 I think the efficiency of my self - education and concentration on the codestates schedule has been not enough to get used to most of concepts and functions of JS for programming competency. I have been trying to invest much of t..
TIL - 20201111
·
BootCamp_Codestates/TIL
오늘 한일 알고리즘 코플릿 문제 풀이 페어 학습 / 4문제 남음. DOM 학습 및 소크라티브 참여 학습내용 및 성취 DOM 개념 학습 및 조작 메소드 실습. 느낀점 바쁘다; 세상에 나만 바쁜것 같은 바쁨이다.