Skip to content

You must be logged in to vote

A: You can declare a variable in JavaScript using the var, let, or const keywords. For example:

var myVar = 10;
let myVar2 = "Hello";
const pi = 3.14;

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by hamzalodhi2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested
1 participant