Search⌘ K
AI Features

Challenge: Logic

Learn to apply JavaScript logic by writing programs that compare two numbers and create an interactive higher or lower game. This lesson helps you understand user input, comparison operators, and flow control to build simple interactive applications.

We'll cover the following...

Task 1

Write a program that asks the user for two numbers and tells them which one is bigger.

Sample input 1:

x: 4
y: 10

Expected output:

The biggest number is 10!

Sample input 2:

x: 30
y: 55

Expected output:

The biggest number is 55!

Sample input ...