I am studying javascipt and meet a very small exercise like this.
Create a sum function with 2 parameters a and b. This is a function which mean they will make the summation between two numbers. The function will return the result of a + b.
Here is my code
function sum(a,b) {
c=a+b;
console.log(c);
}
writelog(sum);
But it said to me that there are some errors in my code, so could you please give me some ideas ? Thank you very much for your time.