Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Dict = []
- var addpair = function (mykey , myvalue) [
- Dict.push({
- key: mykey,
- value: myvalue
- });
- }
- var givevalue = function (my_key) {
- return Dict["'" +my_key +"'"] // not working
- return Dict["'" +my_key +"'"].value // not working
- }
- var dict = {};
- var addPair = function (myKey, myValue) {
- dict[myKey] = myValue;
- };
- var giveValue = function (myKey) {
- return dict[myKey];
- };
Add Comment
Please, Sign In to add comment