title: Reactjs argument expression expected in setinterval
body: <p>I am using setInterval in reactjs but as soon as I use if expression in it. I got an error. My code is</p>
  <pre><code>    setInterval (
          if(this.state.count &gt;4){
              this.setState({
                  classcolor: colors[Math.floor((Math.random() * 2) + 0)]
              })
          }
          this.setState(prevState =&gt; ({
              count: prevState.count + 1
          }), () =&gt; {this.setState({
              classcolor: colors[Math.floor((Math.random() * 2) + 0)]
          })})
          , 2000)
  </code></pre>
  <p>How can I solve this problem? Can someone please help me in this.</p>