Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Naming Convention in JavaScript. Case Styles | JavaScript syntax
Introduction to JavaScript (staging)
course content

Зміст курсу

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

1. Introduction
2. JavaScript syntax
3. Data Types and Variables

Naming Convention in JavaScript. Case Styles

What is meant by naming convention?

Naming conventions propose logic when it comes to naming identifiers. No one imposes these naming conventions as rules, however, they are generally considered in the JavaScript community.

Different Case Styles:

Case explains that how characters are formatted within a word or phrase.

Following the cases that are usually used in Javascript:

  • UPPERCASE: In the upper case all the letters are capital, for example, HOURS and PI. Constants are usually written in upper-case.
  • lowercase: In lower case all the letters are small, for example, name and age. Variable names having only one word are usually written in lower-case.
  • camelCase: Writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, for example, variableA and studentsCount. Functions are usually written in camelCase notation.
  • PascalCase: Writing phrases such that each word in the phrase begins with a capital letter, for example, HumanBeing and StudentsCount. Classes are usually written in PascalCase
123456789101112131415
//lowercase let name = 'bob william'; console.log(name); //uppercase let NAME = 'PAUL ANTHONY'; console.log(NAME); //camelcase let fullPrice = 1000; console.log(fullPrice); //pascal notation let SoftwareDeveloper = true; console.log(SoftwareDeveloper);
copy

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 7
toggle bottom row

Naming Convention in JavaScript. Case Styles

What is meant by naming convention?

Naming conventions propose logic when it comes to naming identifiers. No one imposes these naming conventions as rules, however, they are generally considered in the JavaScript community.

Different Case Styles:

Case explains that how characters are formatted within a word or phrase.

Following the cases that are usually used in Javascript:

  • UPPERCASE: In the upper case all the letters are capital, for example, HOURS and PI. Constants are usually written in upper-case.
  • lowercase: In lower case all the letters are small, for example, name and age. Variable names having only one word are usually written in lower-case.
  • camelCase: Writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, for example, variableA and studentsCount. Functions are usually written in camelCase notation.
  • PascalCase: Writing phrases such that each word in the phrase begins with a capital letter, for example, HumanBeing and StudentsCount. Classes are usually written in PascalCase
123456789101112131415
//lowercase let name = 'bob william'; console.log(name); //uppercase let NAME = 'PAUL ANTHONY'; console.log(NAME); //camelcase let fullPrice = 1000; console.log(fullPrice); //pascal notation let SoftwareDeveloper = true; console.log(SoftwareDeveloper);
copy

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 7
toggle bottom row

Naming Convention in JavaScript. Case Styles

What is meant by naming convention?

Naming conventions propose logic when it comes to naming identifiers. No one imposes these naming conventions as rules, however, they are generally considered in the JavaScript community.

Different Case Styles:

Case explains that how characters are formatted within a word or phrase.

Following the cases that are usually used in Javascript:

  • UPPERCASE: In the upper case all the letters are capital, for example, HOURS and PI. Constants are usually written in upper-case.
  • lowercase: In lower case all the letters are small, for example, name and age. Variable names having only one word are usually written in lower-case.
  • camelCase: Writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, for example, variableA and studentsCount. Functions are usually written in camelCase notation.
  • PascalCase: Writing phrases such that each word in the phrase begins with a capital letter, for example, HumanBeing and StudentsCount. Classes are usually written in PascalCase
123456789101112131415
//lowercase let name = 'bob william'; console.log(name); //uppercase let NAME = 'PAUL ANTHONY'; console.log(NAME); //camelcase let fullPrice = 1000; console.log(fullPrice); //pascal notation let SoftwareDeveloper = true; console.log(SoftwareDeveloper);
copy

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

What is meant by naming convention?

Naming conventions propose logic when it comes to naming identifiers. No one imposes these naming conventions as rules, however, they are generally considered in the JavaScript community.

Different Case Styles:

Case explains that how characters are formatted within a word or phrase.

Following the cases that are usually used in Javascript:

  • UPPERCASE: In the upper case all the letters are capital, for example, HOURS and PI. Constants are usually written in upper-case.
  • lowercase: In lower case all the letters are small, for example, name and age. Variable names having only one word are usually written in lower-case.
  • camelCase: Writing phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, for example, variableA and studentsCount. Functions are usually written in camelCase notation.
  • PascalCase: Writing phrases such that each word in the phrase begins with a capital letter, for example, HumanBeing and StudentsCount. Classes are usually written in PascalCase
123456789101112131415
//lowercase let name = 'bob william'; console.log(name); //uppercase let NAME = 'PAUL ANTHONY'; console.log(NAME); //camelcase let fullPrice = 1000; console.log(fullPrice); //pascal notation let SoftwareDeveloper = true; console.log(SoftwareDeveloper);
copy

Завдання

Your task is to declare a variable with the name numberofplanets but in camelCase. Store the number 8 in that variable. Then show the value on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 2. Розділ 7
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt