title: How to solve SyntaxError: Unexpected token = after importing a class?
body: <p>I created a class in a separate JavaScript file and I imported it in another file. However, I get a syntax error in the exported class.</p>
  
  <p>The class shows no errors when it is not exported.</p>
  
  <p>In <strong>Property.js</strong> (the exported class)</p>
  
  <pre><code>class Property{
  
      //constants declarations
      YEAR_AMOUNT = 10;
      PERIOD_AMOUNT = 120;
  
      //Properties
      closingCosts;
      initialInvestment;
  
      //arrays declarations
      //income
      adjustedRent= new Array();
      adjustedOtherRevenue = new Array();
      grossRevenue= new Array();
      effectiveRevenue= new Array();
  
  constructor(title, address, askPrice, muniLandEval, muniBuildEval, notes){
   this.title=title;    
      this.address=address;
      this.askPrice=askPrice;
      this.muniLandVal = muniLandEval;
      this.muniBuildVal = muniBuildEval;
      this.notes=notes
  }
  
  //other methods
  }
  
  export default class Property
  </code></pre>
  
  <p>In <strong>propertyManager.js</strong> (imported into)</p>
  
  <pre><code>//handle property (calculations, creation, save)
  const express = require('express');
  const router  = express.Router();
  const Property = require('./Property.js');
  
  router.post('/', (req, res) =&gt; {
  
      //create a Property
      const property = new Property(req.body.title,
          req.body.address,
          req.body.askPrice,
          req.body.muniLandVal,
          req.body.muniBuildVal,
          req.body.notes
      );
  })
  
  module.exports = router;
  </code></pre>
  
  <p>The <strong>error</strong> in question</p>
  
  <pre><code>D:\ImmoTuul\RE_Analysis_\RE_MVP\server\routes\api\Property.js:4
      YEAR_AMOUNT = 10;
                  ^
  
  SyntaxError: Unexpected token =
      at Module._compile (internal/modules/cjs/loader.js:723:23)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      at Module.load (internal/modules/cjs/loader.js:653:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      at Function.Module._load (internal/modules/cjs/loader.js:585:3)
      at Module.require (internal/modules/cjs/loader.js:692:17)
      at require (internal/modules/cjs/helpers.js:25:18)
      at Object.&lt;anonymous&gt; (D:\ImmoTuul\RE_Analysis_\RE_MVP\server\routes\api\propertyManager.js:4:18)
      at Module._compile (internal/modules/cjs/loader.js:778:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
  </code></pre>
  
  <p>I would like to be able to use the class and it's constructor in the <strong>propertyManager</strong> file.</p>