Q. JavaScript strings are for ________ text.

  • (A) storing
  • (B) manipulating
  • (C) Both A and B
  • (D) none of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both A and B

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

  • (A) strlen
  • (B) area
  • (C) length
  • (D) size
πŸ’¬ Discuss
βœ… Correct Answer: (C) length

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

  • (A) #
  • (B) |
  • (C) /
  • (D) \
πŸ’¬ Discuss
βœ… Correct Answer: (D) \

Q. code is used for?

  • (A) Carriage Return
  • (B) New Line
  • (C) Form Feed
  • (D) Backspace
πŸ’¬ Discuss
βœ… Correct Answer: (A) Carriage Return

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

  • (A) this
  • (B) let
  • (C) new
  • (D) none of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) new

Q. Comparing two JavaScript objects always returns?

  • (A) True
  • (B) False
  • (C) Can be true or false
  • (D) Can not say
πŸ’¬ Discuss
βœ… Correct Answer: (B) False

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

  • (A) slice()
  • (B) strlen()
  • (C) substr()
  • (D) substring()
πŸ’¬ Discuss
βœ… Correct Answer: (A) slice()

Q. JavaScript counts positions from?

  • (A) -1
  • (B) 0
  • (C) 1
  • (D) Can not say
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0

Q. _________ cannot accept negative indexes.

  • (A) slice()
  • (B) substring()
  • (C) Both A and B
  • (D) none of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) substring()

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

  • (A) Yes
  • (B) No
  • (C) Can be yes or no
  • (D) Can not say
πŸ’¬ Discuss
βœ… Correct Answer: (A) Yes