#day3

Img
Img

Hello everyone! So today I have brought you some JavaScript Facts! 1. what is 0.1+0.2 ? 0.3 right? but when you try it on a JavaScript text editor: 0.1+0.2 //OUTPUT: 0.30000000000000004 0.1+0.2==0.3 //OUTPUT:FALSE 2. Are you familiar with NaN (Not a Number) What do you think its datatype might be? go try, it comes out to be a number. typeof(NaN) //OUTPUT: "number" 3. function name() { return { name: 'Sonakshi' } } name(); OUTPUT: undefined function name() { return { name: 'Sonakshi' } } //OUTPUT:{name: "Sonakshi"} The reason for this difference is that, position of parenthesis matter. In the first case JavaScript thought there is nothing to return. Thanks for reading. Follow me on Instagram https://instagram.com/sona_2500?igshid=12vh5v8k80eaf #day3

Read More