title: Assignment to constant variable
body: <p>i try to read the user input and sent it as a email.
  but when i run this code it gives me this error: Assignment to constant variable.</p>
  
  <p>Any help will be appreciate</p>
  
  <pre><code>var mail= require('./email.js')
  var express = require('express')
  var router = express.Router()
  
  router.post('/',function(req, res, next){
      var address = req.fields.address
      var text = req.fields.text
      var subject = req.fields.subject
  
      try{
         if(text = 0){
             throw new Error('Please enter what u want to say')
         }
         if(subject = 0){
             throw new Error('Please enter subject')
         }
  
      }catch(e){
          req.flash('error', e.message)
          return res.redirect('back')
      }
  
      var detail = {
          to:address,
          text:text,
          subject:subject,
          from: 'test &lt;nbuudilc@126.com&gt;'
      }
  
      email(detail).then(function(){
          req.flash('success','email sent success')
          res.redirect('/posts')
      })
  
  })
  
  module.exports = router
  </code></pre>