I'm learning javascript, I'm a beginner to programming so forgive me if this is obvious, but people seem to write function code like so
function IamAFunction(number) {
return number * 2;
};
why is there a semicolon at the end of the 2nd curly brace. I've written code without the semi colon at the end and it works fine. Why do so many people write functions this way, I understand the semicolons use at the end of an expression, but not function.