Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Console IO

Nathan Wiles edited this page Jan 29, 2022 · 1 revision

Builtins

read()

The read() function will get input from the console, treated as a String type.

print('Please enter your name');
const name = read();
print('Hello ' + name);

readnum()

The readnum function will get input from the console and parse it as a Num type.

print('Please enter a number:');
const input = readnum();
print('The product of your number and 7 is:');
print(input * 7);

print(Any)

Output can be printed to the console with the following syntax:

print('foo');
Clone this wiki locally