loading...
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 🚀 https://github.com/30-seconds/30-seconds-of-code/blob/master/snippets/RGBToHex.md

2. Find the length of a string in bytes

Here's the gist 🚀 https://github.com/30-seconds/30-seconds-of-code/blob/master/snippets/byteSize.md

3. Detect all kinds of Apple Devices

4. Find factorial of any number

Here's the gist 🚀 https://github.com/30-seconds/30-seconds-of-code/blob/master/snippets/factorial.md

5. Function to deep clone an object

Here's the gist 🚀 http://bit.ly/deepclone

6. Convert any string into Camel Case

Here's the gist 🚀 https://github.com/30-seconds/30-seconds-of-code/blob/master/snippets/toCamelCase.md


🔥 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. :)

Posted on Dec 28 '19 by:

kumar_abhirup profile

Kumar Abhirup

@kumar_abhirup

I am a 16-year-old JavaScript React developer from India who keeps learning a new thing every single day. 😍 Twitter: @kumar_abhirup Website: kumar.now.sh

Discussion

markdown guide