JavaScript 中null 与 undefined 的区别是什么?
What is the difference between null and undefined in JavaScript? -PHP Chinese website Q&A-What is the difference between null and undefined in JavaScript? -PHP Chinese website Q&A
Let’s take a look and learn.
JavaScript 中,null 是一个可以被分配的值,设置为 null 的变量意味着其无值。而 undefined 则代表着某个变量虽然声明了但是尚未进行过任何赋值。
What is the difference between null and undefined in JavaScript? -PHP Chinese website Q&A-What is the difference between null and undefined in JavaScript? -PHP Chinese website Q&A
Let’s take a look and learn.
JavaScript 中,null 是一个可以被分配的值,设置为 null 的变量意味着其无值。而 undefined 则代表着某个变量虽然声明了但是尚未进行过任何赋值。