Code Lab BetaBUILD. RUN. DISCOVER.

Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.

Challenges / 02

Cafe Receipt.

About 5–10 minutes
Your lesson
Given: strings priceText = "12.50" and qtyText = "3". Convert with Number() to price and qty. Compute total = price * qty. Log the template literal `Total: ${total}`. If total >= 30, status = "bulk", otherwise status = "regular". Log status. Expected output: Total: 37.5 bulk

Convert → multiply → template literal → condition. All numbers come from the strings.

challenge_02.jsJAVASCRIPT
Loading the runtime… The first launch may take a little longer.
… 0/20000
CHECKSSTANDBY
01Number() on both strings
02total is 37.5; label is bulk
03console shows Total: 37.5 and bulk
…0/10000
ConsoleWrite the code. Bring it online.
›
Calculators BG — 50+ free online calculators | Калкулатори БГ