Variables in JavaScript

Published on : August 13,2022
Variables in JavaScript

Hi dev,

In this article we will learn about define Variables  in javascript.


Variables

We use var, let and const to declare a variable. The var is functions scope, however let and const are block scope. In this challenge we use ES6 and above features of JavaScript. Avoid using var.

let firstName = 'Asabeneh'
firstName = 'Eyob'

const PI = 3.14 // Not allowed to reassign PI to a new value
// PI = 3.

Categories : JavaScript

Tags : JavaScript

Praful Sangani
Praful Sangani
I'm a passionate full-stack developer with expertise in PHP, Laravel, Angular, React Js, Vue, Node, Javascript, JQuery, Codeigniter, and Bootstrap. I enjoy sharing my knowledge by writing tutorials and providing tips to others in the industry. I prioritize consistency and hard work, and I always aim to improve my skills to keep up with the latest advancements. As the owner of Open Code Solution, I'm committed to providing high-quality services to help clients achieve their business goals.


0 Comments

Leave a comment

We'll never share your email with anyone else. Required fields are marked *

Related Articles

How to download a file in JavaScript
Praful Sangani By Praful Sangani - July 25,2022
How to swapping variables in javascript
Praful Sangani By Praful Sangani - August 03,2022
JavaScript exercise-examples for Beginners
Praful Sangani By Praful Sangani - August 03,2022