Tour · 1 of 18
Hello
The program on the right prints how many minutes a day has.
Press Run, or Ctrl+Enter (Cmd+Enter on a Mac), to run it in your browser.
#Scripts
println("A day has ${24 * 60} minutes")A file may start with statements. Such a file is a script, and it needs
no main. println writes one line.
#Values inside strings
"A day has ${24 * 60} minutes"${...} evaluates an expression and puts its value inside the string.
Run it. 24 * 60 is 1440, so it prints A day has 1440 minutes.
Try it: change println("A day has ${24 * 60} minutes") to println("A day has ${hours * 60} minutes") and press Run.
Run: Ctrl+Enter · Pages: Alt+← Alt+→