JavaScript String MCQ Questions & Answers

Javascript (JS) String MCQs : This section focuses on the "Javascript String". These Multiple Choice Questions (MCQs) should be practiced to improve the Javascript skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. JavaScript strings are for ________ text.

A. storing
B. manipulating
C. both a and b
D. none of the above

View Answer

2. To find the length of a string, use the built-in _______ property.

A. size
B. length
C. area
D. strlen

View Answer

3. The ________ escape character turns special characters into string characters

A. \
B. /
C. |
D. #

View Answer

4.  code is used for?

A. Backspace
B. Form Feed
C. New Line
D. Carriage Return

View Answer

5. The _________ keyword complicates the code and slows down execution speed

A. this
B. let
C. new
D. none of the above

View Answer

6. Comparing two JavaScript objects always returns?

C. Can be true or false
D. Can not say

View Answer

7. _______ extracts a part of a string and returns the extracted part in a new string.

A. substring()
B. substr()
C. strlen()
D. slice()

View Answer

8. JavaScript counts positions from?

A. 0
B. 1
C. -1
D. Can not say

View Answer

9. _________ cannot accept negative indexes.

A. slice()
B. substring()
C. both a and b
D. none of the above

View Answer

10. Some browsers do not allow spaces behind the  character.

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


* You must be logged in to add comment.