Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Dictionary
- constructor: ()->
- @keys = []
- @values = []
- add: (key, value)->
- @keys.push(key)
- @values.push(value)
- get: (key) ->
- val for val in @keys when val is key
- length: () ->
- @keys.length
- removeAll: () ->
- @keys.length = 0
- @values.length = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement