1.

In JavaScript, which one is used to finding the non-whitespace characters?(a) \d(b) \s(c) \S(d) \wI have been asked this question in an online quiz.The origin of the question is Essential JavaScript and jQuery in division HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The correct answer is (c) \S

The explanation: There are metacharacters DEFINED in JavaScript. \S is used to find the NON-WHITESPACE character. \d is used for finding a digit. \s is used for finding whitespace character. \w is used to find word character. \W is used to find non word character.



Discussion

No Comment Found

Related InterviewSolutions