What is the value of copy?

Given the code below:

const copy = JSON.stringify([ new String(‘ false ’), new Bollean( false ), undefined ]);

What is the value of copy?
A . — [ ”false” , { } ]–
B . — [ false, { } ]–
C . — [ ”false” , false, undefined ]–
D . — [ ”false” ,false, null ]–

Answer: D

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
sakshi
sakshi
1 year ago

C is the right answer