What is a function literal in JavaScript?

A function literal is an expression that defines an unnamed function. You can try to run the following code to implement function literal in JavaScript.


            var func = function(x,y){ return x*y };

            function secondFunction() {
               var result;
               result = func(10,20);
               document.write ( result );
      <p>Click the following button to call the function</p>

         <input type = "button" onclick = "secondFunction()" value = "Call Function">