javascript - JS removing object method from this method -


i have sample code: https://jsfiddle.net/gdm3rk8r/2/

var map = { }; map[5] = function() {    alert('hey!');    delete map[5]; }  map[5](); 

it's working, correct practise?

edit1: more concrete, have exchange or delete callback same callback


Comments

Popular posts from this blog

php - mysql multiple keyword search in any order -

routing - AngularJS State management ->load multiple states in one page -

unity3d - Problems porting a GLSL shadertoy shader to unity -