자바스크립트
<불리언>
==
🦔type of🦔
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>JavaScript DataType</title>
</head>
<body>
<h1>typeof 연산자</h1>
<p id="result"></p>
<script>
document.getElementById("result").innerHTML = (typeof 10) + "<br>";
document.getElementById("result").innerHTML += (typeof "문자열") + "<br>";
document.getElementById("result").innerHTML += (typeof true) + "<br>";
document.getElementById("result").innerHTML += (typeof undefined) + "<br>";
document.getElementById("result").innerHTML += (typeof null);
</script>
</body>
</html>

<null과 undefined>

'독학' 카테고리의 다른 글
♧10/3 [js] 짧은if else대신 삼항연산자/쉼표연산자/조건문종류/이프문 초보자의 실수와수정/스위치문/반복문종류 (0) | 2022.10.04 |
---|---|
♧TCP School [js] null, undefined/객체란/대입연산자,-=,=-뜻/++x,x++/증감연산자의 연산순서/비교연산자블리언종류 (0) | 2022.10.02 |
♧생활코딩 [자바스크립트] - 객체에 소속된 함수는 메소드, 변수는 프로포티 (0) | 2022.09.29 |
9/28 생활코딩 객체 (0) | 2022.09.28 |
♧9/27 생활코딩 [자바스크립트] - 함수(좌우더하기, 출력=리턴 빨간색5, 밤낮토글리팩토링, 객체(나이트데이코드정리) (0) | 2022.09.27 |