How to invoke a JavaScript Function as a function?

JavascriptWeb DevelopmentFront End Technology

To invoke a JavaScript function as a function, call it like a normal custom JavaScript function.


You can try to run the following code to call a JavaScript function as a function −

         function Display()
            document.write ("Hello World!");
      <p>Click the following button to call the function</p>
         <input type = "button" onclick = "Display()" value = "Display">
Published on 23-Feb-2018 07:53:12