if-else
Chooses between two paths.
Beginner
if (adc > threshold) led_on(); else led_off();
Always use braces — it prevents the "dangling else" and goto-fail style bugs.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.