Usage
Accepting input
Code:
const conif = ; var name = conif;console; var age = conif;console; var height = conif;console;
Output:
Name: myName
Hello, myName
Age: 27
You are 27 years old
Height: 2.25
You are 2.25 metres tall
Functions
getConsoleInput (promptText[, acceptBlank])
acceptBlank
defaults to false
.
Will display prompText
then will wait until user has inputed something, if acceptBlank
is true
will accept nothing as an input. When invalid input is detected will repeat prompt.
getConsoleIntegerInput (promptText)
Will display prompText
then will wait until user has inputed something. When invalid input is detected will repeat prompt. Will truncate floats to integers.
getConsoleFloatInput (promptText)
Will display prompText
then will wait until user has inputed something. When invalid input is detected will repeat prompt.