Are you ready?

1 questions to solve.

Instructions
  1. This quiz goes to full-screen once you press the Start button, or any Next button after exiting the quiz window.
  2. At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
In which of the following ways can we create strings in JavaScript?
Refer to Strings Basic Concepts for more info.
Determine the error in the code below.
var str = "Hello\n
World";
Refer to Strings Basic Concepts for more info.
What is the best description of the problem in the code below?
var str = "Hello World";
str[0] = "F";
Strings are immutable and hence can't be modified as shown in the code snippet above. Refer to Strings Basic Concepts for more info.
How to convert a string str to lowercase characters?
Refer to Strings Properties and Methods for more info.
What does the following code log?
var str = "I love cats!";
console.log(str.indexOf("cat"));
The 'c' in "cat" comes at index 7 in str - hence we get 7 returned by str.indexOf("cat"). Refer to Strings Properties and Methods for more info.
What does the following code log?
var str = "Twice a day";
var index = str.indexOf("a");
var index2 = str.lastIndexOf("a");
console.log(str.indexOf("a", index + 1) === index2);
Refer to Strings Properties and Methods for more info.
How can we extract "Pizza" from the string str = "Pizza Lover"?
Refer to Strings Properties and Methods for more info.
What does str.charAt(1) return for the string str = "Hello"?
Refer to Strings Properties and Methods for more info.
Suppose that str is equal to the string "Mango Apple Orange". What will str.split() return?
If split() is called on a string without an argument, it returns an array with exactly one element that is the string itself. Refer to Strings Properties and Methods for more info.