Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara JavaScript Variables | JavaScript syntax
Introduction to JavaScript

Scorri per mostrare il menu

book
JavaScript Variables

In JavaScript, variables are used to store data. JavaScript variables are “named storage” for data. We can access the value of the variable by using variable name. We can use the variables to store different kinds of data like numbers, text, Boolean, etc.

JavaScript variables syntax:

A variable in JavaScript has a name, a value, and a memory address.

  • The name of the variable distinctively identifies the variable.

  • The value refers to data stored in the variable.

  • The memory address refers to the memory location of the variable.

12
const climate ="spring"; console.log(climate);
copy
Compito

Swipe to start coding

Create two variables named firstValue, and secondValue. Assign 50 to firstValue and 20 to secondValue and print both the variables using the console.log() function.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 2
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

book
JavaScript Variables

In JavaScript, variables are used to store data. JavaScript variables are “named storage” for data. We can access the value of the variable by using variable name. We can use the variables to store different kinds of data like numbers, text, Boolean, etc.

JavaScript variables syntax:

A variable in JavaScript has a name, a value, and a memory address.

  • The name of the variable distinctively identifies the variable.

  • The value refers to data stored in the variable.

  • The memory address refers to the memory location of the variable.

12
const climate ="spring"; console.log(climate);
copy
Compito

Swipe to start coding

Create two variables named firstValue, and secondValue. Assign 50 to firstValue and 20 to secondValue and print both the variables using the console.log() function.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 2
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt