[JavaScript] 03 Data Types, Variable

less than 1 minute read

Published:

In this post, 03 JavaScript lecture is introuduced.

JS Data Types

JavaScript 에는 7개의 Primitive Type 과 Reference Type인 Object와 그 파생 타입이 있다.

  • Primitive types
    • Number, String, Boolean, Null, Undefined, Symbol, BigInt
  • Referece types
    • Object, Array, Function, built-in objects (Date, RegExp, Map, Set … etc)

String

"Hello World".length; // 문자열 길이
"Hello world".toUpperCase(); // 대문자 변환
"Hello world".indexOf('o'); // 문자열 시작위치 반환
"Hello world".trim(); // 공백 제거
"Hello " + "world"; // 문자열 합치기

JS Variables

var name = "james";

Leave a Comment