본문 바로가기

프로그래밍 공부(JS)

처음이라도 쉽게 디자인 할수 있는 미리캔버스 사용법 글 - 구성1.미리캔버스, 망고보드는 디자이너가 아니라도 쉽게 디자인을 할수 있게 도와주는 도구이다. 요즘은 누구나 크리에이터가 될수 있는 세상이다. 크리에이터가 될려면 콘텐츠를 만들때 디자인이 빠질수 없어서 누구나 쉽게 만들수 있게 도와주는 플랫폼 생겨났다.미리 캔버스 url: https://www.miricanvas.com/ 2.미래캔버스 기본으로 템플릿과 사진들이 제공이 된다파일 설정과 사이즈 조절 제목 설정을 하고 자신의 템플릿을 활용해서 꾸밀수도 있고 제공해주는 템플릿을 가지고 자신만의 디자인을 구성할수 있다 사진,요소 텍스트,동영상,배경을 제공해서 쉽게 초보자도 디자인을 쉽게 할수있다.3.장점은 무료이다. 미리캔버스 무료로 제공을 해서 어떠한 콘텐츠를 만들때 자본에대한 걱정을 덜어줄수 있는 장.. 더보기
JavaScript await & async syntactic sugar async & await clear style of using promise 오래걸리는 것을 비동기적 1.async (함수 앞에 async를 쓰면 코드 블록이 promise으로 바뀜) ex) async function fetchTest( { return 'Test1'); } 2.await(async 안에서만 await 사용가능) ex) async function getTest() { await delay(1000); return 'Test1' } async & await 쓰다보면 병렬처리가 쓰게 될때가 있다. 대신 useful APIs( Promise.all() )을 사용하면 좋다. 더보기
JavaScript Promise javascript Promise Promise is a Javascript object for asynchronous operation 1.state 2.producer vs consumer Producer //불필요한 네트워크 받을 수있다 (executor 함수가 자동적으로 실행이 되기때문이다) // the executor runs automatically const promise = new Promise((resolve, reject) => { //heavy work ); Consumer(then, catch, finally) promise.then(value => { }); 더보기
JavaScript callback function JavaScript is synchronous Execute the code block by orger after hoisting hoisting: var, function declaration Synchronous callback 동기적 function printTestA(print) { print(); } Asynchronous callback 비동기적 function printTestB(print, timeout) { setTimeout(print, timeout); } 콜백 지옥에 빠질수 있으니 조심할것 콜백지옥 단점1.가독성 떨어진다 단점.2 디버깅,문제분석이 어려움 더보기
JavaScript Json(1일차 공부정리) JSON javascript object Notation 1. object to JSON stringify(obj) ex) json = JSON.stringify(monster) 2. JSON to object parse(json) const obj = JSON.parse(json) 유의1.)object를 json 변경하면 string변환해서 보내기때문에 json에서 object로 변경할때 string으로 받는다 유의2.)object에서 메서드를 만들고 json으로 변경후 다시 json에서 object 변경할때 데이터만 갔다왔기 때문에 함수는 함수는 Serialize될때 포함이 안되서 함수호출이 안됨 더보기