VIP 👤
🏠 Home
Benchmark
📊 Tutti i benchmark 🦖 Dinosauro v1 🦖 Dinosauro v2 ✅ App To-Do List 🎨 Pagine libere creative 🎯 FSACB - Ultimate Showcase 🌍 Benchmark traduzione
Modelli
🏆 Top 10 modelli 🆓 Modelli gratuiti 📋 Tutti i modelli ⚙️ Kilo Code
Risorse
💬 Libreria di prompt 📖 Glossario IA 🔗 Link utili 🔌 API e router IA
beginner

Default Value Logic

#javascript #logic #variables

Use an empty string to handle missing user input.

Create a script that defines a variable `userName`. If `userName` is an empty string (""), assign the value 'Guest' to a variable called `displayName`. If `userName` has text, assign that value to `displayName`.