ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 25 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

Async funct on functionUnderTest(isOK) {

If (isOK) return 'OK' ;

Throw new Error('not OK');

)

Which assertion accurately tests the above code?

A.
Console.assert (await functionUnderTest(true), ' OK ')
Answers
A.
Console.assert (await functionUnderTest(true), ' OK ')
B.
Console.assert (await functionUnderTest(true), ' not OK ')
Answers
B.
Console.assert (await functionUnderTest(true), ' not OK ')
C.
Console.assert (await functionUnderTest(true), ' not OK ')
Answers
C.
Console.assert (await functionUnderTest(true), ' not OK ')
D.
Console.assert (await functionUnderTest(true), 'OK')
Answers
D.
Console.assert (await functionUnderTest(true), 'OK')
Suggested answer: D
asked 23/09/2024
Nivi Kolatte
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first