title: For variables in document (Javascript)
body: <p>This code isn't completely finished yet. I'm trying to iterate over all 'm' variables within a page until there are no more 'm's within the page. Right now I have 'for (m in document)', which I know to be wrong. Can anyone point me in the right direction for the correct syntax?  </p>
  
  <pre><code>var m = document.getElementsByClassName('project')
    var n = document.getElementsByClassName('web')
    var o = document.getElementsByClassName('print')
    var p = document.getElementsByClassName('illustration')
  
  function projectFilter(type){
       if (type === 'print'){
        for (m in document){
          if (getElementsByClassName('print') != null){
            m.style(opacity=0.3)
            console.log("Whatshappening")
        }
     }
     if (type === 'web'){
        console.log('webbyshit')
     }
     if (type === 'illustration'){
        console.log('illustrating')
     }
     if (type === 'project'){
        console.log('EVERYTHING')
     }
  }
  </code></pre>
  
  <p>Thank you!</p>