daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Jan 16th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var xyz = "test";  
  2. var (xyz) = "abc";
  3. alert (test);
  4.    
  5. var Container = {};
  6. var xyz = "test";
  7. Container[xyz] = "abc";
  8. alert(Container['test']);
  9.    
  10. var xyz = "test";
  11.  
  12. //global
  13.  
  14. window[xyz] = "abc";
  15.  
  16. alert(test);    // "abc"
  17.  
  18. // object property
  19.  
  20. var myData = {};
  21. myData[xyz] = "abc";
  22.  
  23. alert(myData.test);    // "abc"
  24.    
  25. xyz = "test";
  26. eval(xyz+"=123");
  27. alert(test); // gives 123
  28.    
  29. var xyz = "test";  
  30. window[xyz] = "abc";
  31. alert (test);
  32.    
  33. var myObject = {};
  34. var xyz = "test";  
  35. myObject [xyz] = "abc";
  36. alert (myObject.test);
  37.    
  38. var xyz = "test";  
  39. eval ( xyz + "= 'abc';");
  40. alert (test);
  41.    
  42. var key = 'somestring';
  43. var obj = {};
  44.  
  45. obj[key] = 'another value';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top