Exam4Training

Which three expressions return true for the given substring?

Refer to the following code:

Let sampleText = ‘The quick brown fox jumps’;

A developer needs to determine if a certainsubstring is part of a string.

Which three expressions return true for the given substring? Choose 3 answers
A . sampleText.includes(‘fox’);
B . sampleText.includes(‘ quick ’, 4);
C . sampleText.includes(‘ Fox ’, 3)
D . sampleText.includes(‘ fox ’);
E . sampleText.includes(‘ quick ’) !== -1;

Answer: B,D,E

Exit mobile version