A

Admin • 833.24K Points
Coach

Q. What would be the result of the following statement in JavaScript using regular expression methods ?

  • (A) Returns [“123″”456″”789”]
  • (B) Returns [“123″,”456″,”789”]
  • (C) Returns [1,2,3,4,5,6,7,8,9]
  • (D) Throws an exception

Explanation by: Admin

The split() method can take regular expressions as its arguments. The split() method generally breaks the string on which it is called into an array of substrings, using the argument as a separator.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.