Back to articles
Understanding JavaScript Variables Before Blaming React

Understanding JavaScript Variables Before Blaming React

via Dev.to ReactKunal

JavaScript looks easy at first until you realize everything depend on variable and Data types . If you skip these fundamentals your code quickly turns into the guessing game and you end up console.log everything. Topics to Cover What variables are and why they are needed How to declare variables using var, let, and const Primitive data types (string, number, boolean, null, undefined) Basic difference between var, let, and const What is scope (very beginner-friendly explanation) Variables When a child is born they are given a name and throughout their life they will be referred by that name unless the name gets changed. In JavaScript values are assigned by a name and anytime we need that value we simply mention the name to which it was assigned . Before declaring or assigning a variable the first step is learning how to name it correctly . 👉 How to Name Variables Just like human we always put much thoughts to ensure the name has a meaning to it. We do it same for JavaScript. for example

Continue reading on Dev.to React

Opens in a new tab

Read Full Article
0 views

Related Articles