-
Notifications
You must be signed in to change notification settings - Fork 0
Console IO
Nathan Wiles edited this page Jan 29, 2022
·
1 revision
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);
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);
Output can be printed to the console with the following syntax:
print('foo');
Nala Documentation
- Navigation
- Basics
- Primitive Types
- Constructing Types
- Builtins