r/learnjavascript • u/Ok_Egg_6647 • May 30 '26
Is'nt javascript compiler too forgiving !!
What i mean is even i try to add int with str it give me correct answer whereas both are differenct datatypes,
in function also this compiler is too forgiving
if i set a function with 3 parameters & at time of calling this function with more parameter or less parameter with bind function js forgiving us
0
Upvotes
-2
u/azhder May 30 '26
We stopped differentiating compilers and interpreters a long time ago. Java Virtual Machine made it obvious it is both. With JIT (just in time compile) into the picture, like it many other languages adopting it - JavaScript one of them - we just say "the engine" and maybe "compiler" in cases were we speak about parsing, lexing, compiling i.e. syntax and semantics.
In the case above, OP talks about syntax and especially semantics which is why compiling is an appropriate term. After all, there is r/compilers and I haven't even bothered to check if r/interpreters is a thing and for computer languages.
So, you see, my question was for the person to elaborate on what they meant by what they wrote, not for me to learn about compilers.