Knowledge of JavaScript before learning React
1. Basics of JavaScript variables: var, let, and const
var:
Function-scoped.
Can be redeclared and updated.
Example:
var x = 10;
var x = 20; // This is allowed
console.log(x); // 20
let:
Block-scoped.
Can be updated, but not re-decl...
sujaynitrr.hashnode.dev4 min read