Please can someone explain to me why my addOne function doesn't work with the increment operator (++). Please see my code below.
// addOne Function
function addOne(num){
return num + 1
}
log(addOne(6)) => 7
// same function with ++ operator
function addOne(num){
return num++
}
log(addOne(6)) => 6
// Question - why am I getting 6 instead of 7 when I use ++ operator?