Why is my Javascript increment operator (++) not working properly in my addOne function
<p>Please can someone explain to me why my addOne function doesn't work with the increment operator (++). Please see my code below.</p>

<pre><code>// addOne Function

function addOne(num){
  return num + 1
}

log(addOne(6)) =&gt; 7


// same function with ++ operator

function addOne(num){
  return num++
}

log(addOne(6)) =&gt; 6


// Question - why am I getting 6 instead of 7 when I use ++ operator?
</code></pre>