JavaScript10 [JAVASCRIPT] JAVASCRIPT 데이터 객체와 함수 String https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String String - JavaScript | MDN String 전역 객체는 문자열(문자의 나열)의 생성자입니다. developer.mozilla.org indexOf length slice replace match trim 숫자 toFixed parseInt parseFloat Math https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math Math - JavaScript | MDN Math 는 수학적인 상수와 함수를 위한 속성과 메서드를 가진 내장 객체.. 2023. 1. 25. [JAVASCRIPT] JAVASCRIPT 생성자, this, 클래스, 상속 객체 리터럴 const neo = { firstName : 'Neo', lastName : 'Smith' }; 생성자 함수명 첫글자 대문자 new 함수명 재사용 가능 prototype js 객체 기본 속성 function User(first, last) { this.firstName = first this.lastName = last } User.prototype.getFullName = function(){ return `${this.firstName} ${this.lastName}` } const neo = new User('Neo', 'Smith') this 자기 참조 변수 일반 함수는 호출 위치에서 따라 this 정의 화살표 함수는 자신이 선언된 함수 범위에서 this 정의 const amy = .. 2023. 1. 22. [JAVASCRIPT] JAVASCRIPT 함수 화살표 함수 (Arrow Function) // 화살표 함수 // () => {} vs function () {} const double = function(x){ return x * 2 } // const doubleArrow = (x) => { // return x * 2 // } const doubleArrow = x => x * 2 즉시실행함수 (IIFE, Immediately-Invoked Function Expression) (function(){ console.log('hi') }()); 호이스팅(Hoisting) 함수 선언부가 유효범위최상단으로 끌어올려지는 현상 타이머 함수 setTimeout(함수, 시간) : 일정 시간 후 함수 실행 setInterval(함수, 시간) : 시간 간격마다 .. 2023. 1. 22. [JAVASCRIPT] ECMAScript, JAVASCRIPT 기본 ECMAScript(ES) https://ko.wikipedia.org/wiki/ECMA%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8 ECMA스크립트 - 위키백과, 우리 모두의 백과사전 위키백과, 우리 모두의 백과사전. ECMA스크립트(ECMAScript, 또는 ES[1])란, Ecma International이 ECMA-262 기술 규격에 따라 정의하고 있는 표준화된 스크립트 프로그래밍 언어를 말한다. 자바스크립트를 표 ko.wikipedia.org javascript 표준 최신 버전 ES6 (ES2015) 데이터 타입 확인 function getType(data){ return Object.prototype.toString.call(data).slice(8, -1) } 산술 연산자.. 2023. 1. 22. 이전 1 2 3 다음