title: Not understanding for loop output
body: <p>When using the 'a' variable the interpret function outputs the number 20 as I'd expect. </p>
  
  <pre><code>linkedin &lt;- c(16, 9, 13, 5, 2, 17, 14)
  
  interpret &lt;- function(num_views) {
    if (num_views &gt; 15) {
      print("You're popular!")
      return(num_views)
    } else {
      print("Try to be more visible!")
      return(0)
    }
  }
  
  a &lt;- 20
  
  interpret(a)
  #[1] "You're popular!"
  #[1] 20
  </code></pre>
  
  <p>Why then does the for loop not output the numbers above 15 and 0? </p>
  
  <pre><code>for (v in linkedin) {
       interpret(v)
  }
  
  #[1] "You're popular!"
  #[1] "Try to be more visible!"
  #[1] "Try to be more visible!"
  #[1] "Try to be more visible!"
  #[1] "Try to be more visible!"
  #[1] "You're popular!"
  #[1] "Try to be more visible!"
  </code></pre>
  
  <p>I'm running this on the datacamp website instead of the <code>R</code> software in case that makes a difference.</p>