|
|
|
|
|
by gb
4967 days ago
|
|
Certainly delete can be useful, but nulling a property has almost the same effect (apart from hasOwnProperty still returning true) - if you're looking at optimising at the level this article is talking about avoiding delete might well be sensible. |
|
https://gist.github.com/4018282
Edit: I found a jsperf: http://jsperf.com/delete-vs-undefined-vs-null/6
Delete is a little slower, but setting null can be too, and setting undefined is the fastest for me in stable chrome.