목록자바스크립트 (3)
에르노트
자바스크립트를 독학할 때 유용한 웹페이지들을 몇 개 정리해본다. 1. MDN web docs JavaScript JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache developer.mozilla.org 가장 기본이 되는 공식 문서다. 영어와 한국어를 비롯한 매우 다양한 언어를 지원한다. 다만 번역 상태..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/luzDY/btqGGGHNggm/7Ad2Dg1Ya1zuBhCA4VDpJ0/img.png)
여타 프로그래밍 언어들처럼 자바스크립트도 배열을 자료형으로 제공하며, 이 배열을 다루기 위한 Array를 내장 객체로 제공한다. Array Array The JavaScript Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects. developer.mozilla.org 자바스크립트 배열은 길이가 가변적이며 요소의 타입에도 제약이 없다는 점에서 기존 언어의 배열보다도 파이썬의 리스트와 유사하다. 그래서 JS 배열에는 [1, 'a', true]와 같이 자료형과 무관하게 아무 요소나 다 들어갈 수 있다. 이게 싫어서 타입을 딱 정해놓고 싶다면 ES6에 새롭게..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bN724z/btqGC7eXcLt/GYn7EfTPxhplYFKfKkD8YK/img.png)
Math 클래스 String 클래스 Date 클래스 Math 클래스 Math Math is a built-in object that has properties and methods for mathematical constants and functions. It’s not a function object. developer.mozilla.org 자바에서처럼 자바스크립트의 Math 라이브러리는 static 클래스(모든 프로퍼티와 메서드가 static)이다. 그래서 객체 생성 과정 없이 바로 Math.func() 형태로 사용할 수 있다. 여타 언어가 제공하는 수학 관련 클래스와 마찬가지로 자연상수 e나 원주율 pi 등의 상수를 제공하며 절대값이나 제곱근 및 랜덤 등의 연산도 제공한다. 또 sin, cos, t..