The document discusses HTML, CSS, and JavaScript concepts including:
- Using HTML and CSS for static and interactive user interfaces.
- Code examples for CSS prefixes, accordion components, promises, async functions and error handling, sliding animations and image loading.
- Variable declarations and scope, constant variables, type checking, for loops, and array mapping in JavaScript.
- Debugging with breakpoints and examining the call stack.
- Selecting elements, creating elements, and adding event listeners in the DOM.
47. “ 첨에 들어가면 이미지가 겁나 늦게 떠..
리액튼가 그거때문에 그런거아냐?”
- 사랑하는 우리 사장님,
48. “ API 변경됐다네요, 이참에
promise쓴거 async 기반으로 좀 개선해보고요.
가끔 데이터 못가져올때가 있다는데,
실패한 경우 메시지 처리도 같이 고려해봐야할 거 같아요.
아참, 슬라이딩 애니메이션 좀 느리다는데, image 로딩과 겹친 렌더링 문
제 같아요.. 원인찾아서 DOM조작 좀 다시 해보죠.”
“ 우리 사이트 리액트인가 그거에요? 왜이렇게 느려요?”
85. function plusOne(base) {
const bar = base + 1;
bar = bar + 0;
return bar;
}
var foo = 1;
plusOne(foo);
VM1887:3 Uncaught TypeError: Assignment to
constant variable.
92. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
var foo = '1';
plusOne(foo); //string, ’2’
93. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
var foo = [‘1’,1,-1,NaN, null];
plusOne(foo); //NaN
94. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
var foo = [‘1’,1,-1,NaN, null];
plusOne(foo[2]); //0
plusOne(foo[3]); //NaN
95. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
var foo = ['1',1,-1,NaN,null];
var plusFoo = [];
for(var i=0; i<foo.length; i++) {
plusFoo.push(plusOne(foo[i]));
};
console.log(plusFoo); //[2, 2, 0, NaN, 1]
96. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
function makePlusArray() {
// ,
}
var foo = ['1',1,-1,NaN,null];
makePlusArray(foo); //[2,2,0,NaN,1]
97. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
function makePlusArray(foo) {
var plusFoo = [];
for(var i=0; i<foo.length; i++) {
plusFoo.push(plusOne(foo[i]));
};
return plusFoo;
}
var foo = ['1',1,-1,NaN,null];
makePlusArray(foo); //[2,2,0,NaN,1]
98. function plusOne(base) {
base = (typeof base === 'number') ? base : +base;
let bar = base + 1;
return bar;
}
function makePlusArray(foo) {
var plusFoo = [];
debugger;
for(var i=0; i<foo.length; i++) {
plusFoo.push(plusOne(foo[i]));
};
return plusFoo;
}
var foo = ['1',1,-1,NaN,null];
makePlusArray(foo); //[2,2,0,NaN,1]