Mujeeb Ahmed Profile picture
Mar 15, 2022 9 tweets 4 min read Read on X
JavaScript Looping Array Elements🚀(Thread).
1. The for loop:

for loop is used when you want to execute a block of code as long as a specified condition is true.

Syntax :
Examples:
2. for Each:
The forEach() method calls a function (a callback function) once for each array element.

Syntax :
Example:

Note:- the function takes 3 arguments:

The item value.
The item index.
The array itself.

The example below uses only the value parameter.
3. for...of:
The for...of statement creates a loop Iterating over iterable objects , invoking a custom iteration hook with statements to be executed for the value of each distinct property.

Syntax:
Example:
4. for...in:

The for...in statement loops over all of an object's enumerable properties that are keyed by strings (ignoring those keyed by Symbols), including inherited enumerable properties.
Syntax:
Example:
5. map :
The map() method will iterate through the Array elements individually and it will perform some Operations.

Operations might be: Printing, Finding the length of the String, Concatenation, etc.

The method creates a new array by performing a function on each array element
The map() method does not execute the function for array elements without values.

The map() method does not change the original array.

Example:
6. reduce()
The reduce() method runs a function on each array element to produce (reduce it to) a single value.
The reduce() method works from left to right in the array.
The reduce() method does not reduce the original array.
If you enjoyed reading this thread, please do the following:
1. Retweet the first tweet.
2. Follow me and enable notifications: @mujeeb0147.

Thank you for reading all the way through.

• • •

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

Keep Current with Mujeeb Ahmed

Mujeeb Ahmed 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 @hey_mujeebahmed

Jun 26
I don't understand how so few people use AI tools.

Most people only know ChatGPT.

Here are 10 hidden gems you need to know about: Image
1. Hea - “Snap a photo, get the full nutrition label. Yes, it’s that smart.”

⚡️Try for Free ➡️

👉 With Hea! AI Your AI food scanner: Know your calories before your first bite

Keto or Vegan? Make sure every bite fits your diet — just by taking a photo hea.partnerly.us
2. Meet Skywork - Last-minute presentation request from your boss? Stay calm. Copilot for Slides is here.

Try it free 👉

🔍 Deep-researched.
🔗 Source-cited.
📈 Chart-ready.

It launches 1-click export to Google Slides. Skywork makes your mission possible.aisecret.co/Skywork-EN
Read 11 tweets
Jun 21
I typed one sentence: “Build an app to find nearby electricians, plumbers, and carpenters with ratings and contact options.”

Got a full functional app with maps, ratings & messaging — in minutes.

No code. No builder. Just magic.

Here's how👇 Image
I tried a lovable AI tool—but it felt like a chore. Too many prompts, tokens drained fast, and paywalls killed the flow.

Then I tried @rocketdotnew |

Typed one idea. Got everything built:

✅ Full UI
✅ Logic
✅ Data flows
✅ No broken flows
✅ No prompting 10 more times

All from one input.rocket.new
Here are the functional screens Rocket gave me out of the box:

1. Home Screen
2. Service Provider List
3. Service Provider Profile
4. Map View
5. Search Screen
6. Favourites Screen
7. Service Request Form
8. Messages Screen
9. User Profile Screen
Read 6 tweets
Jun 11
This AI tool writes better research papers than humans

It creates full reports with graphs, tables, and images… in minutes.

And it costs less than your coffee.

Here’s why everyone is switching to DeepAgent 🧵↓ Image
Meet DeepAgent – the world's best deep research agent.

It pulls data, creates graphs, tables, diagrams, even images and it’s part of ChatLLM by @abacusai

deepagent.abacus.ai
Here are some of the best features it offers:

1. Want an in-depth research report generated in minutes?

📊 Tables
📈 Charts
🖼️ Images
📄 Clean formatting
Read 9 tweets
May 3
I don’t get why people aren’t using AI,It boosts productivity like nothing else.

Here are 8 AI tools to leverage AI and increase productivity

Bookmark now 🔖 Image
1. AiSOAP - #1 AI Medical Scribe with AI SOAP Notes

Try it free today! → 🔗

Trust me, it’s a game-changer. 💥

→ AiSOAP records, transcribes, and generates customized SOAP notes, saving you 95% of your charting time. Sounds too good to be true? It’s not. 🙌Try.aisoap.com
Fellou - The World’s First Agentic Browser

Try AI browser today! 100%Free 👉 aisecret.co/Fellou

Get Early Access → 🔥aisecret.co/Fellou-Invitat…

Fellou takes action — planning, researching, and executing tasks for you.

Say goodbye to passive browsing. Fellou doesn't just show you the web—it actively does tasks for you.

🖥️ Automates your research & workflows
📈 Generates insightful, visual reports
⚡ 3.1× faster than OpenAI DeepResearch
Read 12 tweets
Apr 17
ChatGPT Pro costs $200/month—too expensive!

Access ChatGPT-o1, DeepSeek-R1, Claude, Gemini, Llama, Grok, Midjourney, Ideogram, Flux Perplexity, Runway and Luma all in one place. Enjoy advanced AI models, image/video creation, and web search.

Here's how ↓ Image
Meet GlobalGPT @GlbGPT - Your Ultimate All-In-One AI Platform.

Access ChatGPT 4.1, Midjourney v7, Grok 3, Claude 3.7, DeepSeek, Gemini, Llama 4, Flux, Ideogram, Perplexity, Runway, Luma, and more—all in one platform.

Try it now👉 glbgpt.com
1. Chat with Top AI Models

• ChatGPT 4.1, Grok 3, Claude 3.7
• Llama 4, DeepSeek-R1, Gemini 2.0
• Perplexity, Mistral, MiniMax, Moonshot, QvQ
Read 9 tweets
Apr 17
I don’t get why people aren’t using AI, It boosts productivity like nothing else.

Here are 8 AI tools to leverage AI and increase productivity

Bookmark now🔖 Image
1. Introducing Intellectia - The Leading AI Investment Platform, Where AI Aligns with Your Ambitions!

DayTrading Center, which is its standout feature, Your Real-Time Edge for Smarter Trades.

→ Unlock daily trading opportunities with real-time event-driven insights & technical signals

→ Simplified, powerful tools for the intraday bottom and top signals—trade like a pro, effortlessly!
2. Mural

→ Mural is a digital workplace that facilitates visual collaboration, brainstorming, and ideation.

→ It's an excellent resource for remote teams trying to emulate the benefits of in-person seminars and meetings.

mural.co/mural-ai
Read 10 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!

:(