Everyday Syntax
The language's building blocks: var, final and const, numbers and strings, cascades, loops, parameter lists and try/catch. Interviewers open with final versus const to test precision.
part ofDartoverview, primer and where to startread it →on this pageshowhide
explore
- Variables & Finality6 questions
- Built-In Types6 questions
- Operators & Cascades4 questions
- Loops & Branching4 questions
- Functions & Parameters6 questions
- Exceptions & Errors5 questions
questions
page 2 of 2In Dart 3.7 and later, what does naming a local variable or parameter _ do, and what convention did it replace?
level: middleimportance: nice to knowfreq 18%
basics
~20 sSince Dart language version 3.7, a local variable or parameter named _ is a non-binding wildcard: any initializer still runs, but the value cannot be read, and several _ may share one scope. It replaces the old _, __, ___ naming convention.
showing 31–31 of 31