Open
Description
Increasing Access
Unsure
Most appropriate sub-area of p5.js?
Reference
Feature request details
Adding an example to the following code here
let square = number => number * number;
console.log(square(5));
will help in the following ways
- Maintain consistency with the previous code snippets
previous example code snippetlet myName = 'Hridi'; function sayHello(name) { console.log('Hello ' + name + '!'); } sayHello(myName); // calling the function, prints "Hello Hridi!" to console.
- give a good understanding to the user who is reading the reference i.e., what the code is doing.
My suggestions (suggested change)
let square = number => number * number;
console.log(square(5)); // calling the function and printing in console, prints "25" to console.