1.

Replace a JavaScript alert pop up with a fancy alert box?

Answer»

An inline FUNCTION is assigned to a variable created at runtime. It is assigned to a variable and can be easily reused.

The following code snippet display that inline functions are assigned:

var show = function() {     alert ('This is inline!') };

Creating a function WITHOUT any name is what we call Anonymous functions.

Let us see an example:

<!DOCTYPE html> <html> <BODY> <p ID="demo"></p> <script> var res = function (val1, val2, val3) {RETURN val1 * val2 * val3}; document.getElementById("demo").innerHTML = res(5, 10, 15); </script> </body> </html>

The output:

750


Discussion

No Comment Found