参考: LEETCODE 中的member access within null pointer of type 'struct ListNode' 解决 leetcode 编译问题:Line x: member access within null pointer of type 'struct TreeNode' 在leetcode上提交代码后出现编译错误: Line x: member access within null pointer of type 'struct TreeNode'
Question: What is the difference from NULL and "0"? Example: return NULL; return 0; Answer: Conceptually, zero (0) is a number, and NULL is a value that represents "no value". As such, 0 can be added, subtracted, etc., but NULL cannot.
当变量为'',false,null,undefined,0,NaN时,返回默认值 var a='' a || 'hello world' "hello world" var a=false a || 'ccc' "ccc" var a=null a || 'ccc' "ccc" var a=undefined a || 'ccc' "ccc" 0 || 'ccc' "ccc" NaN || 'c