DEV Community

Discussion on: From Regular Functions to Arrow Functions

Collapse
 
fijiwebdesign profile image
Gabirieli Lalasava • Edited

There is also these invocations.

(() => ())();

// And 

Func`
${param}
`;

// And

(() => ())``
Enter fullscreen mode Exit fullscreen mode

The first is like () => {} but using () so it's () => ().

The second is a tagged template which is a function that parses a template literal.
developer.mozilla.org/en-US/docs/W...

Third mixes the two.

Here is a concrete example:

((parts, ...tags) => (
    parts.map((part, i) => part + (tags[i] || ''))).join('')
)
`hello ${'world'} of ${'js'}`;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
manarabdelkarim profile image
Manar Imad

thank you Gabirieli 👍 .. I will edit the post and add them or make another post for them later

Collapse
 
alexcorbett profile image
Aqeel

Informative post keep sharing. logo design services in California