DEV Community

Paul C. Ishaili
Paul C. Ishaili

Posted on

4 1

Declaring Variables in JavaScript.

There are three ways to declaring Variables in JavaScript.

Variables are like containers that hold a set of value(s), be it string, boolean, array, numbers or objects.

Because JavaScript is a loosely-typed programming language, specifying the value to be declared in a variable is not needed.

The three ways to declare variables in JavaScript are: var, let and const.

  • const is used to declare variables that their values are not likely to change during the code runtime.

  • let and var, with some signifiant difference, are used to declare variables whose values are very likely to change over the course of a code runtime.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay