Search Header Logo

JavaScript String Methods

Authored by Leonardo Ghiggino

Computers

12th Grade - Professional Development

Used 55+ times

JavaScript String Methods
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

let string = "foo"

How to determine the length of the string?

2.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "The cat is black"

How to find the index/position of "cat" in the string

3.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "The black cat is black"

How to find the LAST index/position of "black" in the string

4.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "Milk, chocolate, cookies"

How to extract a new string "chocolate, cookies" from the first string

5.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "Milk, chocolate, cookies"

How to replace "chocolate" with "banana"?

6.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "Milk, chocolate, cookies"

How to figure out what character is on the 3rd position of the string?

7.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

let string = "Milk, chocolate, cookies"

How to convert the string to upper case?

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?