I've been writing JavaScript for quite a long time now, and I have never had a reason to use null
. It seems that undefined
is always preferable and serves the same purpose programmatically. What are some practical reasons to use null
instead of undefined
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…