프로그래밍 언어/JavaScript & TypeScript
-
[JavaScript] Strict equality (===) 와 equality (==)프로그래밍 언어/JavaScript & TypeScript 2022. 9. 17. 17:39
console.log(1 === 1); // expected output: true console.log('hello' === 'hello'); // expected output: true console.log('1' === 1); // expected output: false console.log(0 === false); // expected output: false console.log(1 == '1'); // expected output: true Reference Strict equality (===) - JavaScript | MDN The strict equality operator (===) checks whether its two operands are equal, returning a B..
-
[TypeScript] 매번 다르게 전달되는 JSON 에 대해 타입 정의하기프로그래밍 언어/JavaScript & TypeScript 2022. 9. 17. 17:18
interface Person { [key: string]: string | number; name: string; age: number; userIdentity: { [key: string]: string }; } const p1: Person = { name: 'Tom', country: 'Chile', age: 30, userIdentity: {userName: 'Ping9', region: 'us-east-1'}}; Reference What does {[key: string]: string} mean in TypeScript | bobbyhadz The `{[key: string]: string}` syntax is an index signature in TypeScript and is used..
-
[JavaScript] JS ES6 에 추가된 기능 및 문법 정리프로그래밍 언어/JavaScript & TypeScript 2021. 11. 9. 22:25
# ECMAScript6 Overview and Comparison http://es6-features.org/ ECMAScript 6: New Features: Overview and Comparison Constants Constants Support for constants (also known as "immutable variables"), i.e., variables which cannot be re-assigned new content. Notice: this only makes the variable itself immutable, not its assigned content (for instance, in case the content is es6-features.org 1. String ..
-
[JavaScript] JavaScript 로 할 수 있는일프로그래밍 언어/JavaScript & TypeScript 2021. 8. 24. 16:07
# JavaScript 의 힘 JavaScirpt(JS)는 1990년대에 웹이 보편화되기전에 어떤 개발자에 의해 10일만에 탄생한 언어로써, 웹이 보편화되어가면서 새로운 언어로 모든 웹사이트를 다시 바꾸기가 비효율적이라 지속적으로 사용되고 있는 불굴의 언어이다. 이로 인해 단점은 있지만, 여전히 프론트엔드 언어는 JavaScript 를 사용할 수 밖에없고, 급기야 시간이 지남에따라 개발자들의 욕망에 따라 백엔드까지 JavaScript로 처리 할 수 있게끔 발전하게 되었다. 그래서 JavaScript를 배우는 것은, 사라질 가능성이 거의없는 언어를 배운다는 것이다. (그걸 나는 이제 알고 배운다... 왜 하필 데이터분석에 빠져서 통계랑 선형대수 같은 것을 공부했을까....ㅠ.ㅠ 타임머신이 필요해...) 무..