DEV Community

Cover image for 6 Awesome JavaScript Snippets to read and learn from!

6 Awesome JavaScript Snippets to read and learn from!

kumar_abhirup profile image Kumar Abhirup ・2 min read

When I was a JavaScript newbie, I used to read a lot of code snippets.

Reading other people's code teaches us a lot. So, I make sure I read and understand a code snippet every day and I also share them on Twitter!

So, here are a few code-snippets I have read in the past few days!

1. Convert RGB colors to Hex Codes

Here's the gist 🚀

2. Find the length of a string in bytes

Here's the gist 🚀

3. Detect all kinds of Apple Devices

4. Find factorial of any number

Here's the gist 🚀

5. Function to deep clone an object

Here's the gist 🚀

6. Convert any string into Camel Case

Here's the gist 🚀

🔥 There are many more online!

30 Seconds Of Code is a very awesome nifty project that has tons of JavaScript Snippets to look at! They have CSS Snippets as well. 🤩

🏆 About me

I am Kumar Abhirup, a 16-year-old JavaScript React developer from India who keeps learning a new thing every single day.

Connect with me on Twitter 🐦
My personal website and portfolio 🖥️

Comment below your better ways, and suggestions to improve this post. :)

Discussion (4)

Editor guide
monfernape profile image
kumar_abhirup profile image
josiasaurel profile image
Josias Aurel

Thanks. Useful snippets

kumar_abhirup profile image