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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
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
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
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University