From c7cb9955247f1d6545f24265e1b1555489a9a5f8 Mon Sep 17 00:00:00 2001 From: jharaghav32 <83938321+jharaghav32@users.noreply.github.com> Date: Mon, 10 Oct 2022 20:03:45 +0530 Subject: [PATCH] Added the concept of arrow function --- javascript/functions/functions.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/javascript/functions/functions.md b/javascript/functions/functions.md index 6ca6fad..3838b2a 100644 --- a/javascript/functions/functions.md +++ b/javascript/functions/functions.md @@ -91,6 +91,14 @@ let message = function () { console.log('Happy Learning!'); } ``` +Apart form that we can also use an arrow function to assign function to a variable explicity. + +### Examples +```javascript +let message = ()=>{ +console.log('Happy Learning!'); +} +``` You can copy function to an another variable. ```javascript @@ -107,4 +115,4 @@ greetings(); // prints Happy Learning! * A function can be assigned to a variable. * You can default values to the parameters of a function -* A function is created predominently for re-usability. \ No newline at end of file +* A function is created predominently for re-usability.