---
title: "Discussion on \"JavaScript Interview Question: Function Scope vs. Block Scope\" | Hashnode"
description: "Discussion on \"JavaScript Interview Question: Function Scope vs. Block Scope\". Learn about the difference between function and block scope in JavaScript and how variables behave within these scopes. Gain a understanding of hoisting."
url: "https://hashnode.com/posts/javascript-interview-question-function-scope-vs-block-scope/6436e7d4d3b300c1dde36e1d"
---

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

Discussion

# [JavaScript Interview Question: Function Scope vs. Block Scope](https://atomicjuggernaut.hashnode.dev/javascript-interview-question-function-scope-vs-block-scope?utm_source=hashnode&utm_medium=feed)

Learn about the difference between function and block scope in JavaScript and how variables behave within these scopes. Gain a understanding of hoisting.

Apr 12, 2023 · 3 min read · atomicjuggernaut.hashnode.dev  
Read the article

-   [#block-scope](https://hashnode.com/tag/block-scope)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#global-scope](https://hashnode.com/tag/global-scope)
-   [#local-scope](https://hashnode.com/tag/local-scope)
-   [#function-scope](https://hashnode.com/tag/function-scope)

## Written by

[Anirudha Patil](https://hashnode.com/@AnirudhaPatil)

@AnirudhaPatil · India

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

Frontend Developer

Hi, I'm Anirudha ! I'm currently learning frontend development and sharing my journey through blogging. Join me as I document my experiences, struggles, and victories as I become a skilled Frontend Developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
