- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di JavaScript: == vs ===
This JavaScript equality quiz compares loose ==, which converts types first, with strict ===, which does not. You will work through the classic traps with null, NaN, empty strings and objects, and learn which comparison to use by default.
Domanda di esempio
Domanda 1 di 10What does this print?
console.log(1 == "1", 1 === "1");
Mostra la risposta
B. true false == converts the string "1" to the number 1 before comparing, so it is true. === sees a number and a string, different types, so it is false.
Cosa copre questo quiz
- How
==converts types and===does not null == undefinedand whynull == 0is falseNaNis not equal to anything, even itself- Objects and arrays are compared by reference
Object.is()andNumber.isNaN()
Domande frequenti
Serve un account?
No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.
Posso rifarlo?
Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.