Which two tests are most accurate for this code?
The developer wants to test this code:
Const toNumber =(strOrNum) => strOrNum;
Which two tests are most accurate for this code? Choose 2 answers
A . console.assert(toNumber(‘2’) === 2);
B . console.assert(Number.isNaN(toNumber()));
C . console.assert(toNumber(‘-3’) < 0);
D . console.assert(toNumber () === NaN);
Answer: A,C
Latest JavaScript Developer I Practice Questions with 144 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments