Codeacademy JavaScript - Section 2-1
<p>I took an AP computer science course a few years ago, I learned Java from it. I'm trying this Codeacademy now and I'm puzzled by this one question, can anyone explain this to me?
Here is the question:</p>

<p>You are a creature of habit. Every week you buy 5 oranges. But orange prices keep changing!</p>

<ol>
<li>You want to declare a function that calculates the cost of buying 5 oranges.  </li>
<li>You then want to calculate the cost of the 5 all together.  </li>
<li>Write a function that does this called orangeCost().  </li>
<li>It should take a parameter that is the cost of an orange, and multiply it by 5.  </li>
<li>It should log the result of the multiplication to the console.  </li>
<li>Call the function where oranges each cost 5 dollars.  </li>
</ol>

<p>Here's my code:</p>

<pre><code>var getCost = orangeCost (costOfOrange) {
    console.log(costOfOrange * 5);
};
getCost(5);
</code></pre>

<p>I believe it follows the syntax showed in earlier problems, but I'm getting this output:</p>

<pre class="lang-none prettyprint-override"><code>SyntaxError: missing  before statement
Oops, try again. 
It looks like your syntax isn't quite right. 
Feel free to peek back at earlier exercises if you need help!
</code></pre>
