DEV Community

Vikas Singh
Vikas Singh

Posted on

Day 6 β€” JavaScript Functions & Methods

Hey devs! πŸ‘‹
Today was all about one of the most powerful building blocks in JavaScript β€” functions. Here’s what I covered:

πŸ”Ή Function Declaration & Calls
How to define a function and call it when needed.

πŸ”Ή Arguments & Return Values
Passing values into functions and returning results back.

πŸ”Ή Scopes in JavaScript
I finally understood:

Function Scope

Block Scope

Lexical Scope

πŸ”Ή Function Expressions
Using functions as variables β€” opening doors to more flexibility.

πŸ”Ή Higher Order Functions
Mind-blowing stuff! Functions that:

Accept other functions as arguments

Return other functions β€” welcome to functional programming!

πŸ”Ή JS Methods
And lastly, the difference between functions and methods.
(Hint: Methods are just functions inside objects πŸ‘€)

πŸ“Œ All My Links: https://linktr.ee/vikasdotdev

Top comments (0)