processing / p5.js-website-legacy

Archived p5.js website 2015-2024
http://archive.p5js.org
MIT License
240 stars 484 forks source link

Missing example in function reference #1466

Open ankur0904 opened 9 months ago

ankur0904 commented 9 months ago

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

My suggestions (suggested change)

let square = number => number * number;
console.log(square(5)); // calling the function and printing in console, prints "25" to console.  
ankur0904 commented 9 months ago

@limzykenneth What are your thoughts about the issue?

ankur0904 commented 9 months ago

@aakash-a-dev Please have a look at this comment

limzykenneth commented 9 months ago

I'm not sure I personally like code comments that explains what the code should already describe.