HTML CSS and JavaScript for Beginners - A Web Design Course - JavaScript String Methods
Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens to the length of a string when spaces are added?
The length increases.
The length decreases.
The length remains the same.
The length becomes zero.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to find the first occurrence of a substring in a string?
lastIndexOf
find
indexOf
search
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'lastIndexOf' method do?
Finds the first occurrence of a substring.
Finds all occurrences of a substring.
Finds the last occurrence of a substring.
Finds the middle occurrence of a substring.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you specify a starting position for 'indexOf'?
By using 'indexOf' with a second argument.
By using 'lastIndexOf' with a second argument.
By using 'find' with a second argument.
By using 'search' with a second argument.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'search' method do?
Finds the last occurrence of a substring.
Finds the middle occurrence of a substring.
Finds the first occurrence of a substring.
Finds all occurrences of a substring.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value is returned if a substring is not found using 'indexOf'?
undefined
null
-1
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the function created in the last section?
To find the length of a string.
To check if a word exists in a string.
To convert a string to uppercase.
To replace a word in a string.
Similar Resources on Wayground
6 questions
Modern Web Design with HTML5, CSS3, and JavaScript - jQuery Arrows Methods
Interactive video
•
University
6 questions
JavaScript Mastery from Zero to Hero - Prepare for Coding Interviews - Using IndexOf in JavaScript King’s Court - Exam
Interactive video
•
University
6 questions
TypeScript for Beginners - Using Arrays
Interactive video
•
University
6 questions
Complete SAS Programming Guide - Learn SAS and Become a Data Ninja - Macro Functions 2 (%Scan)
Interactive video
•
University
6 questions
Modern Web Design with HTML5, CSS3, and JavaScript - JavaScript Truthy and Falsy – Explained
Interactive video
•
University
6 questions
Elasticsearch 7 and Elastic Stack - In Depth and Hands On! - Index Alias Rotation
Interactive video
•
University
6 questions
Modern JavaScript from the Beginning - Second Edition - Section Introduction-1
Interactive video
•
University
6 questions
Quick JavaScript Crash Course - Modern and Advanced JavaScript - Default Operators
Interactive video
•
University
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Information Technology (IT)
10 questions
Identifying equations
Quiz
•
KG - University
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
HS2C2 AB QUIZIZZ
Quiz
•
1st Grade - Professio...
14 questions
Homonyms Quiz
Quiz
•
KG - University
16 questions
Parts of a Parabola
Quiz
•
8th Grade - University
10 questions
A Brief History of Geologic Time
Interactive video
•
11th Grade - University
15 questions
Black Friday/Cyber Monday
Quiz
•
9th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University