2022-03-31から1日間の記事一覧
typeof演算子 console.log(typeof 100); //'number' const arr = [1, 2, 3]; console.log(typeof arr); //'object' type NumArr = typeof arr; const val: NumArr = [4, 5, 6]; const val2:NumArr=['foo','bar','baz']; 変数arrに[1, 2, 3]を代入(ここで型推…
typeof演算子 console.log(typeof 100); //'number' const arr = [1, 2, 3]; console.log(typeof arr); //'object' type NumArr = typeof arr; const val: NumArr = [4, 5, 6]; const val2:NumArr=['foo','bar','baz']; 変数arrに[1, 2, 3]を代入(ここで型推…