en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Function naming convention

Open shadybassily opened this issue 2 years ago • 1 comments

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.

shadybassily avatar Jan 22 '24 16:01 shadybassily

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.

prakhar-pal avatar Feb 01 '24 20:02 prakhar-pal