Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Strings 2/5 | Data Types and Variables
Introduction to JavaScript (staging)
course content

Kursusindhold

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

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

book
Strings 2/5

String length:

We use the length property to check the length of the string.

1
console.log(`JavaScript`.length );
copy
Opgave

Swipe to start coding

The task is to create a string variable named running and assign the value The horse runs so fast to it. Now check the length or number of characters in the above variable.

Løsning

Note: length property also considers the spaces between the string length.

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 3. Kapitel 20
toggle bottom row

book
Strings 2/5

String length:

We use the length property to check the length of the string.

1
console.log(`JavaScript`.length );
copy
Opgave

Swipe to start coding

The task is to create a string variable named running and assign the value The horse runs so fast to it. Now check the length or number of characters in the above variable.

Løsning

Note: length property also considers the spaces between the string length.

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 3. Kapitel 20
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