- 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: Map & Set
Map and Set are JavaScript's built-in collections for key-value pairs and unique values. This quiz checks their basic methods, how keys and duplicates work, iteration order and the differences from plain objects.
Domanda di esempio
Domanda 1 di 10What does this print?
const s = new Set([1, 2, 2, 3, 3, 3]);
console.log(s.size);
Mostra la risposta
D. 3 A Set stores each value only once, so the duplicates are dropped and three values remain. Use size, not length.
Cosa copre questo quiz
- Removing duplicates with
Set Mapkeys of any type vs object keys that become stringssize,get,set,hasand iteration- Why objects in a
Setare compared by reference - Turning a
Mapinto JSON
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.