Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var testObject = {
  2.   function function1() {
  3.     alert('function2');
  4.   },
  5.   function function2() {
  6.     alert('function2');
  7.   }  
  8. }
  9.  
  10. var functionName = 'function1';
  11.  
  12. //Should call testObject.function1()
  13. testObject.functionName();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement