Naming Conventions (JavaScript)

JavaScript predominantly uses 2 naming conventions: camelCase and PascalCase.

What is the JavaScript standard for naming conventions?

JavaScript predominantly uses 2 naming conventions: camelCase and PascalCase.

Variables, functions and input parameters are all declared using camelCase

let firstName;
let age;
function calculateAge(birthDate){...}

Classes are usually defined using PascalCase

class Person {
    name;
    age;

    calculateAge(birthDate){...}
}

Level: Novice · More JavaScript terms at this level

Updated