---
title: "Discussion on \"Hoisting in JavaScript\" | Hashnode"
description: "Discussion on \"Hoisting in JavaScript\". Before going into Hoisting let us see in how many ways we can declare a function in JavaScript.\n1. Function Declaration :\nWe will write a simple function which adds two numbers and logs the sum in console.\nfunction sum(a, b){\nconsole.log(a+ b)\n};\n2. ..."
url: "https://hashnode.com/posts/hoisting-in-javascript/61e0141effa55d74f0089448"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Hoisting in JavaScript](https://sreedharnambi.hashnode.dev/hoisting-in-javascript?utm_source=hashnode&utm_medium=feed)

Before going into Hoisting let us see in how many ways we can declare a function in JavaScript. 1. Function Declaration : We will write a simple function which adds two numbers and logs the sum in console. function sum(a, b){ console.log(a+ b) }; 2. ...

Jan 13, 2022 · 2 min read · sreedharnambi.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Sreedhar Nambi](https://hashnode.com/@sreedharnambi)

@sreedharnambi

  
[View profile](https://hashnode.com/@sreedharnambi)

Learning MERN

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
