title: I'm automating tweeting of an array of sentences but only one sentence gets tweeted and then it breaks
body: <p>this code is supposed to tweet a sentence in an array of sentences as per the interval. It tweets one sentence but the rest don't get tweeted.</p>
  <p>Here is the code</p>
  <pre><code>var Twit = require('twit');
  
  var config = require('./config')
  
  var T = Twit(config)
  
  let r = Math.floor(Math.random()*10)
  
  setInterval(tweetIt, 1000*30)
  
  words = ['God is good', 'Today is a good day', 'Make  the rules. Its yr life', 'Pray', 'Learn- Everyday', 'Books?', 'Movies?', 'Adventure?', 'Niceness', 'Love']
  
  
  function tweetIt(){
      var tweet = {status: words[r]}
  
      T.post('statuses/update', tweet, 
      function tweeted(err, data, response){
          if(err){
              console.log('it broke')}
          else{console.log('worked');
      }
      }
      )
  }
  </code></pre>
  <p>This is the congif file</p>
  <pre><code>module.exports ={
      consumer_key: &quot;############&quot;,
      consumer_secret: &quot;############&quot;,
      access_token: &quot;############&quot;,
      access_token_secret:&quot;############&quot;
  }
  </code></pre>
  <p>In that array of sentences, only one sentence gets tweeted and the rest dont. Instead, it prints that string error;
  worked
  it broke
  it broke
  it broke
  it broke
  it broke</p>