Swapna Kumar Panda Profile picture
Feb 10, 2022 11 tweets 7 min read Read on X
25 Utility Code for your next JavaScript Project

➊ Check if input is of number type
➋ Check if input value contains a number
➌ Check if input value is null or, undefined
➍ Check if input value is null or, empty string
➎ Check if input value is falsy
➏ Check if input is an Array
➐ Check if input is an Empty object
➑ Convert first character of each sentence to uppercase
➒ Convert first character of each word to uppercase
➓ Reverse a string
➊➊ Convert a number from one base to another
➊➋ Create and initialise array
➊➌ Empty an array
➊➍ Remove falsy values from an array
➊➎ Remove duplicates from array
➊➏ Casting an array to array of numbers
➊➐ Return a series of integers starting from 0
➊➑ Flatten Array to any depth
➊➒ Remove Holes from Array
➋x➓ Merge any number of arrays
➋➊ Shuffle an array
➋➋ Generate a Random Boolean
➋➌ Generate a Random Number
➋➍ Generate a Random ID
➋➎ Generate a Random Hex Color Code
👉Suggestions👈

⬖ Do you have better implementation for any of these methods? Share those in 💬

⬗ If you find any incorrect information, do inform me.
🚏 Upcoming Twitter Space

📅 12-Feb-2022 (Saturday)
⏰ 07.30PM IST (02.00PM GMT)

⬘ Join me in this space to have some interesting technical discussion around "Arrays and Functions in JavaScript".

⬙ Share among your circle if anyone is interested.

twitter.com/i/spaces/1dRJZ…
End of 🧵

Do you find these utility code useful? I will be sharing more like these for HTML, CSS, JavaScript and React in coming days regularly.

To never miss any, Follow me ✅

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Swapna Kumar Panda

Swapna Kumar Panda Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @swapnakpanda

May 8
FREE FREE FREE

9 FREE Books on DSA in Java, C, C++, Python:Image
Image
Image
Image
1. Think Data Structures

- DSA using Java

🔗 greenteapress.com/thinkdast/thin…Image
Image
2. Data Structures and Algorithm Analysis

❯ C++ people.cs.vt.edu/~shaffer/Book/…

❯ Java people.cs.vt.edu/~shaffer/Book/…Image
Image
Read 10 tweets
May 7
Absolute Beginner Friendly Programming Notes

❯ Python
❯ Java
❯ C/C++, DSA
❯ HTML, CSS, JavaScript
❯ SQL
❯ Linux, Git

40 other subjects - 10000+ Pages (💯 FREE)

No signup required. Find links inside.Image
1. Python

- More than 200 Chapters
- 700+ Pages

goalkicker.com/PythonBook/Image
2. JavaScript

- More than 100 chapters
- 400+ Pages

goalkicker.com/JavaScriptBook/

❯ Node.js
goalkicker.com/NodeJSBook/

❯ React
goalkicker.com/ReactJSBook/

❯ React Native
goalkicker.com/ReactNativeBoo…

❯ TypeScript
goalkicker.com/TypeScriptBook…

❯ jQuery
goalkicker.com/jQueryBook/

❯ Angular
goalkicker.com/Angular2Book/Image
Read 10 tweets
May 5
Be an SQL Expert in 2025: A roadmap for absolute beginners
Beginner
⭣ Learn fundamentals ➊
⭣ Working with table ➋
⭣ Working with data ➌
⭣ Querying the data ➍
⭣ Operators ➎
⭣ Functions ➏
⭣ Database objects ➐
⭣ Programming in SQL ➑
⭣ Users and Roles ➒
⭣ Advanced Concepts ➓
Pro
➊ Fundamentals

Effort: 1 to 2 hours per day
Time: 2 weeks

➀ What is a database and DBMS?
➁ What is a relational database?
➂ What are the different vendors for RDBMS?
➃ What is normalization?
➄ Different normalization forms (NFs).
➅ What is SQL?
➆ Different components of SQL.
➇ What is ERD?
Read 14 tweets
May 4
Best skills to build in 2025: AI & ML

Here's a comlete roadmap w/ all free resources:
1. Python

Time: 1 month

Focus on Python programming and basic data structures.

⬙ Detailed Roadmap
x.com/swapnakpanda/s…

⬗ Free Book - Think Python (O'Reilly)
allendowney.github.io/ThinkPython/

⬗ Free Book - Introduction to Python Programming
assets.openstax.org/oscms-prodcms/…

⬘ Free Course - Harvard CS50
cs50.harvard.edu/python/

⬖ YouTube - Python for Everybody (freeCodeCamp)
youtube.com/watch?v=8Dvywo…Image
2. Mathematics for AI/ML

Time: 2 Months

➤ Key Topics
✩ Linear Algebra
✩ Single and Multivariable Calculus
✩ Probability & Statistics

⬙ Free Book
❯ Mathematics for Machine Learning
mml-book.github.io/book/mml-book.…

❯ Mathematics for Machine Learning (UC Berkeley)
gwthomas.github.io/docs/math4ml.p…

⬗ More Free Books
x.com/swapnakpanda/s…

⬘ Free Course - Khan Academy
❯ Linear Algebra
khanacademy.org/math/linear-al…

❯ Probability & Stats
khanacademy.org/math/statistic…

⬖ YouTube
youtube.com/@JonKrohnLearnsImage
Read 10 tweets
May 2
75 sites you should bookmark FOREVER!!!

Open the thread for all the links. Image
1. Web Development (HTML/CSS/JS)

❯ HTML ➟ web.dev/html
❯ HTML ➟ learn-html.org
❯ HTML ➟ developer.mozilla.org/en-US/docs/Lea…

❯ CSS ➟ web.dev/css
❯ CSS ➟ css-tricks.com/guides
❯ CSS ➟ developer.mozilla.org/en-US/docs/Lea…

❯ JavaScript ➟ web.dev/javascript
❯ JavaScript ➟ developer.mozilla.org/en-US/docs/Lea…

❯ HTML & CSS ➟ theodinproject.com/paths/full-sta…
❯ HTML & CSS ➟ scrimba.com/learn-html-and…
2. JavaScript, React, Next, Node.js, Express.js

❯ JavaScript ➟ javascript.info
❯ JavaScript ➟ web.dev/javascript
❯ JavaScript ➟ developer.mozilla.org/en-US/docs/Lea…
❯ JavaScript ➟ theodinproject.com/paths/full-sta…

❯ Node.js ➟ nodejs.org/learn/
❯ Node.js ➟ theodinproject.com/paths/full-sta…

❯ Express.js ➟ developer.mozilla.org/en-US/docs/Lea…
❯ Express.js ➟ expressjs.com/en/starter/ins…

❯ React ➟ scrimba.com/learn-react-c0e
❯ React ➟ theodinproject.com/paths/full-sta…

❯ Next.js ➟ youtube.com/playlist?list=…
Read 11 tweets
Apr 30
Anyone can start in computer science.
Anyone can do programming.

Learn it for FREE from Harvard, Stanford, and MIT. Here's how:
➊ CS50: Harvard University

It's one of the top courses and teaches how to think algorithmically and solve problems efficiently.

Topics: Data Structures, Algorithms, Web Development, etc.

Languages: C, Python, JavaScript, HTML, CSS, SQL, etc.

cs50.harvard.edu/x/2025/
➋ CS101: Stanford University

Stanford offers this 101 course that is designed for absolute beginners.

It teaches the essential ideas of computer science providing background about computers, hardware, software, etc.

Self-paced and super easy to start.

online.stanford.edu/courses/soe-yc…
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(