How declare and call a function in JavaScript

1 Answer

0 votes
function myFunction() { // Declare a function
    document.write("myFunction");  // Function code
}
 
myFunction(); // Call the function

 
/*
run:

myFunction 

*/

 



answered Apr 28, 2017 by avibootz
...