INTRODUCTION TO JAVASCRIPT
JavaScript is a lightweight and server-side language. JavaScript can execute on a device that has a special program called the JavaScript engine. JavaScript is used to design dynamic web pages with HTML and CSS.
JavaScript Frameworks
- Angular
- React
- Node.js
- Vue
- Ember
- Polymer
- BackBone
Function In JavaScript
Function Declaration
when declaring a function we use the function keyword.
function add(number1 ,number2)
{
return number1 + number2;
}
In the above example add is the function name and number1, number2 are the arguments that we pass to the function.
Function Invocation
add(number1, number2);
when we declare an anonymous function, let see how to call an anonymous function call
var func = function (){
alter("This is an anonymous function");
}
func();
🔷Named Function
function add(number1 ,number2)
{
return number1 + number2;
}
Comments
Post a Comment