JavaScript では、変数にどんなデータが入っているかを「実行時」に調べたい場面があります。 そんなときに使えるのが typeof 演算子 です。 typeof は JavaScript で値の「データ型(型)」を調べる演算子 です。
The typeof operator in JavaScript is a powerful tool used to determine the type of a given variable or expression. This operator is particularly useful when you need to process values differently ...