+ 1
How to use Function????
I am just now starting to use Java Script and all I know is how to use variables, and im not even done with that and i've not been able to learn anymore. Please someone tell me how. (For e.x., var = puppyPet how do i use function to make him move??)
1 Answer
+ 3
function myFunctionName(n) {
var x = 5;
x += n;
console.log(x);
}
myFunctionName(6); //Outputs 11
This is a really simple function; I suggest you look more into the JavaScript tutorial.



