String Methods Quiz

String Methods Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

G10 CS String Manipulation

G10 CS String Manipulation

12th Grade

15 Qs

AP CSP Unit 6

AP CSP Unit 6

10th - 12th Grade

20 Qs

Javascript

Javascript

10th - 12th Grade

15 Qs

Programing fundamental

Programing fundamental

12th Grade

20 Qs

CodeHS U8 L

CodeHS U8 L

10th - 12th Grade

12 Qs

Unit 5 Quiz - Loops & Lists (code.org)

Unit 5 Quiz - Loops & Lists (code.org)

10th - 12th Grade

20 Qs

Java - arrays and String methods

Java - arrays and String methods

9th - 12th Grade

12 Qs

CS 26_01_24

CS 26_01_24

9th - 12th Grade

20 Qs

String Methods Quiz

String Methods Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Sáng Nguyễn

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the method charAt(index) return?

A new string created from UTF-16 code units

The index of the first occurrence of a value

The character at the specified index

The Unicode of the character

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is returned by charCodeAt(index) if the index is out of bounds?

An empty string

The length of the string

The character at the last index

NaN

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does String.fromCharCode(...) do?

Replaces a substring in a string

Finds the last occurrence of a value

Converts a string to lowercase

Returns a string from UTF-16 code units

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the indexOf(searchValue[, fromIndex]) method return if the value is not found?

0

-1

null

undefined

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the replace(searchValue, newValue) method?

To convert a string to uppercase

To split a string into an array

To replace matches of a pattern with a new value

To find the index of a character

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the split(separator[, limit]) method return?

A new string

An array of substrings

The length of the string

The first character of the string

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the substring(indexStart[, indexEnd]) method do?

Returns a new substring from the specified start index

Replaces a substring in the string

Converts the string to lowercase

Finds the last index of a character

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?