変数とデータ型、typeof()
10375 ワード
へんすう
var
// var : 선언 재할당 가능
var name = "asd";
console.log(name);
var name = "javascript";
console.log(name); */
let
// let : 선언 재할당 불가능
let name = "asd";
console.log(name);
let name = "javascript";
console.log(name);
// let : 선언 재할당 불가능
let name = "asd";
console.log(name);
name = "javascript";
console.log(name);
const
// const : 재선언 재할당 불가능
const name = "asd";
console.log(name);
name = "javascript";
console.log(name);
データ型
typeof
<script>
var a;
document.write("typeof a = " +typeof a+"<br>");
var a=3;
document.write("typeof a = 3 : " +typeof a+"<br>");
var a="javascript";
document.write('typeof a = "" : ' +typeof a+"<br>");
var a=true;
document.write("typeof a = true : " +typeof a+"<br>");
var a=["html","css","javascript"];
document.write("typeof a = [] : " +typeof a+"<br>");
function a(){};
document.write("function a(){} : "+typeof a+"<br>");
var a = function a(){};
document.write("a = function a(){} : "+typeof a+"<br>");
var a = Symbol("심볼의 설명");
document.write("a = Symbol() : "+typeof a +"<br>");
</script>
演算子
Reference
この問題について(変数とデータ型、typeof()), 我々は、より多くの情報をここで見つけました https://velog.io/@cheshirehyun/변수와-자료형-typeofテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol