daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Dict = []
  2. var addpair = function (mykey , myvalue) [
  3.   Dict.push({
  4.     key:   mykey,
  5.     value: myvalue
  6.   });
  7. }
  8.    
  9. var givevalue = function (my_key) {
  10.   return Dict["'" +my_key +"'"]         // not working
  11.   return Dict["'" +my_key +"'"].value // not working
  12. }
  13.    
  14. var dict = {};
  15. var addPair = function (myKey, myValue) {
  16.     dict[myKey] = myValue;
  17. };
  18. var giveValue = function (myKey) {
  19.     return dict[myKey];
  20. };
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