FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Modern JS Discussion: var/let/const
NewsWeb Development

Modern JS Discussion: var/let/const

via Dev.to JavaScriptKenta Takeuchi11h ago

This article was originally published on bmf-tech.com . ※This article is a reprint from the Innovator Japan Engineers’ Blog . What is Scope Before diving into the main topic, let's review the definition of scope. Scope refers to the range within which variable names and function names can be referenced . There are various types of scopes, but here we will explain mainly three types of scopes in a table. Scope Name Range Remarks Global Outside of functions Accessible from anywhere. Local (Function) Inside of functions Accessible only from within the local scope. Block Inside of blocks ({ }) if, for, switch, etc. Block scope was not originally available in JavaScript, but with the introduction of let and const, block scope can now be used. About var, let, const var Redeclaration Reassignment Scope ○ ○ Local var allows both redeclaration and reassignment. var a = 1 ; var a = 2 ; // Redeclaration possible function sayNum () { a = 100 ; // Reassignment possible return a ; } console . log (

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
3 views

Related Articles

News

Gothub is live

Lobsters • 11h ago

I Built the Tool I Wish I Had When I Started My Open Source Journey
News

I Built the Tool I Wish I Had When I Started My Open Source Journey

Medium Programming • 11h ago

Razer Boomslang 20th Anniversary Mouse Review: For Collectors
News

Razer Boomslang 20th Anniversary Mouse Review: For Collectors

Wired • 11h ago

How Bug Bounty Hunters Prioritize 10,000 Recon Targets (Without Losing Their Mind)
News

How Bug Bounty Hunters Prioritize 10,000 Recon Targets (Without Losing Their Mind)

Medium Programming • 11h ago

Microsoft Hasn’t Had a Coherent GUI Strategy Since Petzold
News

Microsoft Hasn’t Had a Coherent GUI Strategy Since Petzold

Lobsters • 12h ago

Discover More Articles