Scribe
Scribe

Ti piace? Rendi Scribe ancora migliore lasciando una recensione

Ottieni l'estensione Chrome

Sfoglia

  • Video Popolari
  • Video Recenti
  • Tutti i Canali

Strumenti Gratuiti

  • Scaricatore di Sottotitoli Video
  • Generatore di Timestamp Video
  • Riassuntore di Video
  • Contatore di Parole Video
  • Analizzatore di Titoli Video
  • Ricerca Trascrizioni Video
  • Analisi Video
  • Creatore di Capitoli Video
  • Generatore di Quiz Video
  • Chat con Video

Prodotto

  • Prezzi
  • Blog
  • Ottieni l'estensione Chrome

Developers

  • Transcript API
  • API Documentation

Legale

  • Termini
  • Privacy
  • Supporto
  • Mappa del sito

Copyright © 2026. Realizzato con ♥ da Scribe

— Se questo ha reso la tua vita più facile (o almeno un po' meno caotica), lascia una recensione! Promettiamo che ci renderà felici. 😊

Related Videos

JavaScript - Variables - W3Schools.com

Video thumbnail
1.77k514 Parole2m readGrade 5
Condividi
Channel
w3schools.com
Hey there! Ever wondered how JavaScript stores all that cool data like numbers, text, and more? Today, we’re looking at JavaScript variables.
So, what are variables? Imagine you’ve got a treasure chest where you can stash gold coins, diamonds, or. pizza coupons.
Variables are like these chests! You give them names to identify what’s inside. Here, "goldCoins" holds "5", "diamonds" holds "6".
And "pizzaCoupons"? Well, sadly, it holds 0. But here’s a pro tip: Always declare variables before using them.
It’s good programming practice! Declaring variables means creating your treasure chest before putting stuff in. In JavaScript, we’ve got three main ways to declare variables: "var", "let", and "const".
"var" is the oldest method, but we rarely use it today unless we’re writing code for really old browsers. Instead, use "let" for values that change and "const" for values that don’t. Think of "const" as a lock on your chest you can’t change what’s inside.
Here’s a quick rule of thumb: Here’s a quick rule of thumb: Always use "const"! Unless you need to be able to change the value. For example, if you’re storing constant values like prices, use "const".
If you’re calculating something, use "let". Now let’s talk about variable names which are called "identifiers" in JavaScript. These are the labels for your treasure chests.
Identifiers need to follow some naming rules. Identifiers can contain letters, numbers, $, and _ Identifiers must START with a letter, $, or _ And, identifiers can’t be reserved words like "let" or "const"! Pro tip: Identifiers are case-sensitive.
"carName" with a capital "N" is different from "carname" without any capital letters! Here’s a cool thing: In JavaScript, the = sign doesn’t mean ‘equal to’ like in math. It’s an assignment operator.
It stores the value on the right into the variable on the left. Look at this example. It wouldn't make any sense in normal math.
"x" equals itself + 3? But in JavaScript it makes perfect sense! Using the assignment operator, this assigns the value of "x + 3" to "x" See?
It recalculates x to 8 by adding 3 to the existing value. Variables can hold different things. For example numbers or strings.
Numbers are straightforward, but strings—those are text values written inside quotes! Just remember: Put quotes around text, but not around numbers! Here’s something fun: You can do math with "numbers" in JavaScript.
But if you combine strings it is called concatenation! Careful, though. If a number is in quotes, JavaScript will treat it as a string.
Watch this: Hmpf! We didn't intend to add these like that! We wanted to add them like numbers.
Lets remove the quotes and try again. And that’s the magic of JavaScript variables! Remember, they’re just containers for your data.
Use "const" for "constants", "let" for changeable values, and skip "var" unless you’re coding for dinosaurs. Thanks for watching! Like and subscribe to get notified about our latest videos!
For more coding tips and tricks, keep it locked right here on W3Schools. com! Don't forget to try out what you've learned in our interactive editor.
Happy coding!
Video correlati
Multithreading in Java | Detailed with code examples
12:08
Multithreading in Java | Detailed with cod...
SumoCode
39 views
Urban Planning in Games
1:00:09
Urban Planning in Games
GDC 2025
12,980 views
JavaScript - Let Keyword - W3Schools.com
3:15
JavaScript - Let Keyword - W3Schools.com
w3schools.com
1,071 views
Python Full Course for Beginners
6:14:07
Python Full Course for Beginners
Programming with Mosh
43,092,010 views
JavaScript VARIABLES are easy! 📦
12:49
JavaScript VARIABLES are easy! 📦
Bro Code
102,813 views
🔴 Deep Focus 24/7 - Ambient Music For Studying, Concentration, Work And Meditation
🔴 Deep Focus 24/7 - Ambient Music For Stu...
4K Video Nature - Focus Music
Learn HTML for Beginners - W3Schools.com
47:18
Learn HTML for Beginners - W3Schools.com
w3schools.com
258,580 views
7 Design Patterns EVERY Developer Should Know
23:09
7 Design Patterns EVERY Developer Should Know
ForrestKnight
332,941 views
JavaScript - Syntax - W3Schools.com
4:04
JavaScript - Syntax - W3Schools.com
w3schools.com
4,217 views
Learn JavaScript - Full Course for Beginners
3:26:43
Learn JavaScript - Full Course for Beginners
freeCodeCamp.org
19,309,000 views
Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
11:29
Static vs Non-Static Variables and Methods...
Coding with John
226,637 views
JavaScript map() method in 7 minutes! 🗺️
7:01
JavaScript map() method in 7 minutes! 🗺️
Bro Code
58,692 views
Aprende JavaScript Ahora! curso completo desde cero para principiantes
3:58:56
Aprende JavaScript Ahora! curso completo d...
HolaMundo
2,855,174 views
JavaScript Promises In 10 Minutes
11:31
JavaScript Promises In 10 Minutes
Web Dev Simplified
1,843,279 views
JavaScript FUNCTIONS are easy! 📞
12:14
JavaScript FUNCTIONS are easy! 📞
Bro Code
57,177 views
JavaScript Full Course for free 🌐 (2024)
12:00:00
JavaScript Full Course for free 🌐 (2024)
Bro Code
2,874,101 views
FASTER JavaScript In 2025 With Sets
13:13
FASTER JavaScript In 2025 With Sets
Jack Herrington
30,511 views
Please Master This MAGIC Python Feature... 🪄
25:10
Please Master This MAGIC Python Feature... 🪄
Tech With Tim
181,607 views