TRADITIONAL FUNCTION:
The function is a block of code and it is used to perform a specific task.
Traditional functions have their own this, can be used as constructors, and have arguments.
It contains function keyword, function name, and followed by parenthesis and curly brackets.
Example:
function name(){
console.log("Arul")
}
name()
ARROW FUNCTION:
It is also block of code ,It reduces the code length.
Arrow functions don’t bind this, cannot be constructors, and don’t have arguments.
It not contains function keyword, function Name.
Example:
const arrow=()=>console.log("Arul")
arrow()
Top comments (0)