Advertisement
Guest User

Special Olympics

a guest
Apr 10th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fnEvery = (obj,keys) ->
  2.   pointer = obj
  3.   unless keys.length is 0
  4.     return keys.every (key,index) ->
  5.       pointer = pointer[key]
  6.       return pointer?
  7.  
  8. fnSome = (obj,keys) ->
  9.   console.log "НАЧАЛЬНИК! ЭТОТ ПИДАРАС ОБОСРАЛСЯ!"
  10.  
  11. input =
  12.   a:
  13.     b: "bydlo"
  14.   c:
  15.     d:
  16.       e: "ebanoe"
  17.  
  18. console.log "#############"
  19. console.log fnEvery(input,[])
  20. console.log fnEvery(input,["a","b","c"])
  21. console.log fnEvery(input,["c","d","e"])
  22. console.log "#############"
  23. console.log fnSome(input,[])
  24. console.log fnSome(input,["a","b","c"])
  25. console.log fnSome(input,["c","d","e"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement