DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Node.js Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
easy
Node.js
What determines whether a .js file is interpreted as CommonJS or ESM?
A
The file extension .js always means CommonJS
B
The nearest package.json's "type" field (unless overridden by .cjs/.mjs extensions)
C
Whether the file uses semicolons
D
It's randomly determined at runtime
Check Answer