Duration: 16 minutes
Summary: In this video we explore how to pass a function as a parameter to a function. This type of practice is supported in JavaScript. But avoid the case where it can be ambiguous and hard for other programmers to follow and fix your code. We start by creating a function that takes three parameters. The first two parameters are values and the third parameter is the function. Then we trigger the function (third parameter) by passing it the first two parameters. Then we will discuss how to call JavaScript functions from a link. We will create two functions that display some information. We will also create two HTML links. The href of these links will be calls to the JavaScript functions.
Methodology of the development of example: Good coding standard and simplified design.
Technology Used: JavaScript – Core language Concepts
Keywords: CSS, JavaScript, HTML, function, var, script, document, writeln.