Key Concepts

Review core concepts you need to learn to master this subject

If Expressions

var morning = true if (morning) { println("Rise and shine!") } // Prints: Rise and shine!

An if expression is a conditional that runs a block of code when its condition has a true value.

Conditional Expressions
Lesson 1 of 1

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo