Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function spikes() { console.log('call spikes()'); }
- function ledge() { console.log('call ledge()'); }
- function cannons() { console.log('call cannons()');
- var l1 = {group: 'spikes'}
- var l2 = {group: 'ledge'}
- var l3 = {group: 'cannons'}
- window[l1.group]() // affiche : call spikes()
- window[l2.group]() // affiche : call ledge()
- // Et donc on peut arriver à ça
- // window[l1.group].create()
- // Mais faudrait trouver comment sont définies les fonctions .create
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement