Web Devs
644 subscribers
218 photos
22 videos
17 files
233 links
Articles, News, Jokes, Quotes, Back-End and UI/UX for web developers.
Github : https://github.com/fullStackDevsGroup
Advertising: @adsfullStackDevs
Download Telegram
#Js
#Function

JavaScript Functions 4 ways

1️⃣ Functions Declaration

A function created with a function declaration is a Function object and has all the properties, methods and behavior of Function objects.

2️⃣ Functions Expression

The function keyword can be used to define a function inside an expression.

The main difference between a function expression and a function declaration is the function name .

3️⃣ Arrow Function Expression

An arrow function expression is a compact alternative to a traditional function expression, but is limited and can't be used in all situations.

4️⃣ Concise Arrow Function Expression

Arrow functions can have either a "concise body" or the usual "block body".

In a concise body, only an expression is specified, which becomes the implicit return value. In a block body, you must use an explicit
return
statement.

@fullStackDevs
👍1