Step 3. Functions and Return

This shows how a function can "return" a value to whatever called it.

This World displays nothing on the screen. It writes to the console. To access the console press something like Ctrl-Shift-J or Command-Option-J or F12, depending on your browser.

Instead of "println" this World uses the P5 function print() to print to the console. You can also use the standard JavaScript console.log(). Or you can use the Ancient Brain function AB.msg() to write a message to the run header.


Tutorial 5.3
Functions and Return. Nothing on screen. See console for output.
Tweet this step: