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
Liquid error: internal
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
Liquid error: internal
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
Liquid error: internal
4. Find factorial of any number
Liquid error: internal
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
Liquid error: internal
Here's the gist 🚀 http://bit.ly/deepclone
6. Convert any string into Camel Case
Liquid error: internal
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. :)
Top comments (4)
Cool.
thanks!
Thanks. Useful snippets
thanks!