Hey in this article I am going to be showing some unique things that you may not know about javascript! enjoy guys!
1) The -0
Did you know that javascript has a -0 number? we actually use the +0 number as default but you know what they return 0 anyway so both of them are equal.
2) NaN (Not a number) is a special number!
If you didn't know NaN is actually a special number. if you don't believe me just use the code that is given below and you would be surprised!
One more weird and interesting thing about this is NaN is not equal to itself meaning NaN !== NaN
3) Setting and reading the urlparams using searchParams
You can use the search params
to get the value of any param and also you can set a param with a value using this.
4) Some cool icons using HTML Entity
There are some basic icons that you might wanna use in your site so instead of importing font and do all those time-consuming things
you can use some cool icons using the HTML Entity some examples are given below
That was it! Thank you for reading my article hope you enjoyed it and let me know if you like this little article of mine. Thank you so much for reading this!🙂
Top comments (4)
Great article! 😃 Learning JS seems to be an endless road yet an exiting one as well.
BTW, regarding NaN, I wrote an article a few months ago, here's the link in case you wanna take a look:
dev.to/diegolepore/nan-isnan-numbe...
Cheers!
Thank you so much glad you liked it! enjoy.🔥
Hey. Seems you forgot the 5th thing 🤔
Oh man,😂 Thanks for pointing it out.