
// number type
let num1 = 1234;
let num2 = 5.678;
// string type
let str1 = "hello";
// boolean type
let bol1 = "true";
let bol2 = "false";
// null type : 값이 정의됬는데 그값이 null
let null = null;
// undefined type : 값이 정의되지않음
let un1;
let un2 = undefined;
// array type
let arr = [1,2,3];
산술연산자 + - * / % **
대입연산자 += -= *= /=
증가,감소연산자 a++ --a
비교연산자 < > <= >=
동등연산자 == !=
일치연산자 === !--
논리연산자 && ||
삼항연산자 조건식?true일때:false일때
// 기본형
function sum (a,b){
return a + b;
}
// 화살표함수형
const sum = (a,b) => {
return a + b;
}