title: Run simple js file using node
body: <p>I am using node v0.10.20 and OSX 10.8.5. </p>
  
  <p>I created a simple js file called variables.js which you can see below:</p>
  
  <pre><code>var productName
  var currentPrice
  var totalCost
  var productTax
  
  productName = "cookies"
  currentPrice = 3
  productTax = currentPrice * .07
  totalCost = currentPrice + productTax
  console.log("Your " + productName + " cost $" + totalCost)
  </code></pre>
  
  <p>When I run the lines individually in the node repl, or in chrome, it works correctly and the ouput is "Your cookies cost $3.21".</p>
  
  <p>However, when I run the command "node variables.js" from the directory that the file is located in I get the following error message:</p>
  
  <pre><code>/directorypath/variables.js:13
  # create a javascript file (variables.js) that 
  ^
  SyntaxError: Unexpected token ILLEGAL
   at Module._compile (module.js:439:25)
   at Object.Module._extensions..js (module.js:474:10)
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Function.Module.runMain (module.js:497:10)
   at startup (node.js:119:16)
   at node.js:901:3
  </code></pre>
  
  <p>What am I doing incorrectly here?</p>