study(5)
-
2020.7.7 복습
누군가에게 설명한다고 생각하고 개념을 기억해보기 ( 누군가 설명해달라고 했을때 바로 설명 가능할정도로 이해해야한다. - 커뮤니케이션 능력 ) 배열의 구조 객체의 구조 배열과 객체의 특징 배열의 용어 이해 -index. element 객체의 용어 이해 - key , value, property 배열의 element (요소 ) 추가 , 삭제 , 조회를 설명 객체 속성 (property ) 의 추가 삭제 조회를 설명 dot noatation & braketnotation 반복문에서 초기화 조건식 증감문 설명 축약형 연산자 ( +=) 설명 return 과 console.log 의 차이 설명 배열의 구조 : 배열은 브라켓 안에 순서가 있는 값들이 들어가 있는 것을 뜻한다. 이 순서는 인덱스 라고 부르고 , 0부터..
2020.07.07 -
JavaScript array - push () , pop() , slice() , splice()
push() 배열의 끝에 하나이상의 요소를 추가하고 , 배열의 새로운 길이를 반환 *원본 배열을 바로 수정 * const fruits = ['apple', 'banana', 'avocado', 'lemon', 'cherry']; const count = fruits.push('kiwi'); console.log(count); // expected output: 6 console.log(fruuits); // expected output: Array ['apple', 'banana', 'avocado', 'lemon', 'cherry', 'kiwi']; fruits.push('orange', 'grape'); console.log(animals); // expected output: Array [['app..
2020.07.07 -
Document. querySelector()
정의 Document.querySelector() 은 제공한 선택자나 선택자뭉치와 일치하는 문서 내 첫번째 element 를 반환한다. 일치하는 요소가 없으면 null 을 반환한다. 구문 document.querySelector(selectors); 선택자로 DOM요소를 선택해야 한다. 아닐경우 SYNTAX_ERR 가 발생한다. css 표준 구문이 아닌 문자일경우 역슬래시로 이스케이프 JavaScript또한 역슬래시로 이스케이프 해야함 예제 클래스를 만족하는 첫번째 요소 검색 var el = document.querySelector(".myclass"); 복잡한 선택자 var el = document.querySelector("div.user-panel.main input[name=login]"); Do..
2020.07.05 -
Javascript - event listener/ addEventListener
event listener window.onclick = function(){ alert('I\'m clicked')' }; 위의 코드가 대표적인 이벤트리스너 코드이다. window가 click 될때 function부분이 실행된다 window가 click 됐다는것을 browser가알려준다. 이벤트 리스너는 항상 on + '이벤트명' 으로 명명된다. 여러가지 태그에 이벤트를 설정할 수 있다 . ( 모든 DOM들 ) 자주쓰이는 이벤트 목록 onblur (객체가 포커스를 잃었을때) onchange(객체의 내용이 바뀌고 포커스를 잃었을때 ) onclick (객체를 클릭했을때 ) ondbclick ( 객체를 더블클릭 했을때) onerror(에러가 떴을떄) onfocus(객체에 포커스 되었을때 ) onkeydown..
2020.07.05 -
HTML - style , script 태그
HTML style tag https://www.freecodecamp.org/news/inline-css-guide-how-to-style-an-html-tag-directly/ Inline CSS Guide – How to Style an HTML Tag Directly You’ve written some HTML and now need to style it with CSS. One way is to use inline styles, which is what this article is about. This is my first paragraph. Before we jump into the nuances of inline styles—w www.freecodecamp.org 링크를 이용해서 외부 CS..
2020.07.04