Back to articles
Understanding Variables and Data Types in JavaScript

Understanding Variables and Data Types in JavaScript

via Dev.to TutorialBhupesh Chandra Joshi

Image about your birthday and how business operates around your birthday, gifts are ordered from online shops like amazon and flipkart. Let's start with a story, you blow the candle and after the celebration is done, you pick up the gifts and keep them into the place /table or box. This table/(box) or place is a memory location and A variable is a container for storing valuies. Keep in mind ,variable=vari+able, which is changeable or not fix. whatever value you place in a variable that can vary over time. var chai=150; we created a chai which is 150 rupees and there we are dealing with variable declaration and assignment in one line. let chai=150; we created a variable chai with same price 150 and now let's try to observe ,what is the difference. IF We want that our chai price will be fix and not change over the time, we will Harness the fix price. const chai=250; here we have fixed the chai price. what is the scope? Scope is the set of rules for variable ,where it is visible function,

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
30 views

Related Articles