Exam4Training

Which two options remove the whitespace from the beginning of searchString?

Refer to the code below?

Let searchString = ‘look for this’;

Which two options remove the whitespace from the beginning of searchString? Choose 2 answers
A . searchString.trimEnd();
B . searchString.trimStart();
C . trimStart(searchString);
D . searchString.replace(/*ss*/, ‘’);

Answer: B,D

Exit mobile version