Anitpatterns Globals and delete
Testing Antipatterns in globals and the ability to delete
HTML
<p>Testing Antipatterns in globals and the ability to delete </p>
JavaScript
var globalOne = 0;
globalTwo = 3;
//attempt to delete
delete globalOne;
delete globalTwo;
//test
alert(typeof globalOne);//does not get deleted
alert(typeof globalTwo);
//globalTwo gets deleted and logs undefined