daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest May 16th, 2018 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function depth (d, tree) {
  2.   var ds = new Array();
  3.   for (var key in tree) {
  4.     switch (typeof tree[key]) {
  5.       case "object": ds.push(depth(d + 1, tree[key]));
  6.       default: break;
  7.     }
  8.   }
  9.   return ds.sort().last();
  10. }
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