Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Variables Naming Convention | JavaScript syntax
Introduction to JavaScript

Stryg for at vise menuen

book
Variables Naming Convention

Variables naming convention:

  1. Variables in JavaScript are case-sensitive. Case-sensitive means variables are treated differently depending on whether it is in capitals or lower-case text.

12345
let name="Bob William"; console.log(name); let NAME ="Jacob Thomas"; console.log(NAME);
copy

We will get two different outputs because the name and NAME are two different variables.

Opgave

Swipe to start coding

Suppose there are 50 students in a class and you want to store this in a variable, and for that you need a variable name to store this information. Your task is to choose the suitable identifier for your variable name from these numberOfStudents, student, and std and print the value on the console.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 8

Spørg AI

expand
ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

book
Variables Naming Convention

Variables naming convention:

  1. Variables in JavaScript are case-sensitive. Case-sensitive means variables are treated differently depending on whether it is in capitals or lower-case text.

12345
let name="Bob William"; console.log(name); let NAME ="Jacob Thomas"; console.log(NAME);
copy

We will get two different outputs because the name and NAME are two different variables.

Opgave

Swipe to start coding

Suppose there are 50 students in a class and you want to store this in a variable, and for that you need a variable name to store this information. Your task is to choose the suitable identifier for your variable name from these numberOfStudents, student, and std and print the value on the console.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 8
Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Vi beklager, at noget gik galt. Hvad skete der?
some-alt