javascript-tutorial / en.javascript.info

Modern JavaScript Tutorial
https://javascript.info
Other
23.13k stars 3.84k forks source link

Function naming convention #3652

Open shadybassily opened 6 months ago

shadybassily commented 6 months ago

in Functions section, exactly inside naming conventions, you recommend to prefix a function with check... if the function returns a true/false, yet in one of the examples, you named a function isPrime that returns true if a num is prime.

prakhar-pal commented 5 months ago

I don't believe it matters that much as long as function names are meaningful.

This is a convention but conventions can change by project to project.