-
Notifications
You must be signed in to change notification settings - Fork 303
Getting started #5139
Copy link
Copy link
Closed
Labels
answered🎉 Yay! The issue has been resolved, or the question has been answered.🎉 Yay! The issue has been resolved, or the question has been answered.question
Metadata
Metadata
Assignees
Labels
answered🎉 Yay! The issue has been resolved, or the question has been answered.🎉 Yay! The issue has been resolved, or the question has been answered.question
Type
Fields
Give feedbackNo fields configured for issues without a type.
Node.js Version
v24.14.0
NPM Version
v11.9.0
Operating System
Win11 25H2
Subsystem
constants
Description
I'm new to Node.js. All my previous experience with JavaScript is when it is browser-hosted.
Is there a node program control that disables the variable declaration requirement, so that variables can be implicitly declared when an assignment occurs (similar to browser-hosted implementations)?
Minimal Reproduction
file="one";vs.
const file="one";orvar file="one";Output
file="one";
^
ReferenceError: file is not defined
at file:///C:/Users/Public/npm/Sample-Const.js:1:5
at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:661:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Node.js v24.14.0
Before You Submit