⛔️ early errors
errors on code parsing stage
JS ⟩ error ⟩ compile-time ⟩ early errors
errors on code parsing stage.
deplicate parameters can cause early errors❗️
⛔ Uncaught SyntaxError: Duplicate parameter name not allowed in this context
replit:early errors in JS
console.log("Howdy"); // never runs❗
sayHi("Hello", "Hi"); // never runs❗
// ⭐️ duplicate parameter name not allowed in "strict mode"
// ----------------------------------------------------------
// ⛔ Uncaught SyntaxError:
// Duplicate parameter name not allowed in this context
// ↓
function sayHi(x, x) {
"use strict";
console.log(x);
}Last updated
Was this helpful?