title: How to get everything within an array and assign it to a variable with a space in between as a string
body: <p>so say i have a array and i don't know how long it is:</p>
  
  <pre><code>var arr=["first","second","final"];
  </code></pre>
  
  <p>and i have a object</p>
  
  <pre><code>var obj={
      first:{
          second:{
              final:"asdf"
          }
      }
  }
  </code></pre>
  
  <p>how to i make it so the when the function below is triggered, the function go through array so like it will think: </p>
  
  <p>array[0] is first, ok then lets find first in object obj. arryr[1] is second, ok lets find second within first and so on) and find the value of final. but keep in mind the actual object is a lot more complex so u can't just tell me to obj[arr[0]][arr[1]][arr[2]]  or anything like that. </p>
  
  <pre><code>function search(arr){
      //wat here
  }
  </code></pre>