09:00-10:00 gym
12:00-13:00 lunch
13:30- 22:00(아마?) library 피서는 도서관에서🍉
한줄평: 떡볶이 키위주스 삼겹살 🐷
https://developer.mozilla.org/ko/docs/Web/API/XMLHttpRequest
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/replace
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/substring
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf
tailwind
https://tailwindcss.com/
<link
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css"
rel="stylesheet"
/>
cndjs
https://cdnjs.com/
template 구조
대댓글 (재귀)
vscode 익스텐션 (REST Client)=> 네트워크 탭 열지 않고 response 값 알 수 있음
hn.http
샵샵샵 GET url HTTP/1.1
(타입스크립트)타입 or 인터페이스는 변수와 구분(카멜 케이스)을 위해 대문자로 시작
제네릭
type News={
id: number;
title:string;
}
type NewsDetail= News & {
comments: NewsComment[];
}
type NewsComment = News & {
comments: NewsComment[];
level:number;
}
funtion getData<AjaxResponse>(url:string):AjaxResponse{
ajax.open("GET",url,false);
ajax.send()
return JSON.parse(ajax.response)
}
const 디테일 = getData<NewsDetail>(CONTENT_URL)
함수 return 값이 없을 때 : void
타입 알리아스 vs 인터페이스 (유니언 타입 X)
type News={
id: number;
title:string;
}
interface News{
id:number;
title:string;
}
type NewsDetail= News & {
comments: NewsComment[];
}
interface NewsDetail extends News{
comments:NewsComment[];
}
interface News{
readonly id:number;
readonly title:string;
}