A

Admin • 833.24K Points
Coach

Q. Which method returns the string starting at the specified position?

  • (A) substr()
  • (B) getSubstring()
  • (C) slice()
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 22
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

The substr() method returns the string starting at the specified position by the specified number of characters. Example:

var s = "Hello world!";
var res = str.substr(1, 3); //ell

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.