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

Nov 5
🚨 Breaking: AI coding just leveled up.

Imagine describing the software you want to build, and AI simulates it before a single line of code is written.

No chaos. No rewrites. Just precise, production-ready builds.

Here’s why this changes everything ↓ Image
Introducing Yansu by @isoformai

➙ The AI coding platform that brings calm, control, and confidence to your team!
➙ Yansu turns human intent into production-ready code through a structured AI workflow. Guided by intent, refined through scenario simulation, validated by human QA, and improved through collective learning.

Try it out here : bit.ly/43A44Oj
Core features:

1. Auto design specs & dependencies
➙ Generate design specs, tasks, and dependencies automatically.
Read 9 tweets
Sep 22
STOP using ChatGPT!!!

ChatGPT text can be caught in seconds.

Here’s a hack to make it undetectable:

Open This ↓ Image
ChatLLM from @abacusai helps you escape AI detection and is the best all in world AI platform in the world

Try it out here ➙ chatllm.abacus.ai/?token=mujImage
➙ Write like a human and escape AI detection
Read 8 tweets
Aug 5
RIP ChatGPT Agent 👋

This AI agent does it all for less price:

→ Builds full apps
→ Creates stunning decks
→ Automates workflows
→ Edits your videos too

Here’s how ↓ 🔖 Image
Try 🔗 by @abacusai

One prompt — and all your jobs are done:
→ Build apps
→ Make decks
→ Do research
→ Automate workflows
→ Edit videos

$10/month. Zero headaches. deepagent.abacus.ai/mjbImage
Here are the features :

1. Create pro-level decks in seconds.

→ Give DeepAgent a topic, and it handles the rest: slides, structure, and styling.
Read 10 tweets
Aug 4
12 remote jobs paying $80/hr, No Resume No Experience required: Image
1. Gaggle:

→ Gaggle hires content reviewers to monitor online student activities and promote kid safety.

→ Pay ranges from $20 to $25 per hour.

→ Work include identifying potential challenges in K-12 student communications. Flexible scheduling with a minimum of 10 hours each week. Basic technological knowledge and an interest in kid safety are necessary.
2. Preply:

→ Preply is an online tutoring company that provides possibilities in more than 100 courses.

→ Set your own rates, with potential revenues of more than $40 per hour.

→ There is no need for specific qualification; simply be knowledgeable about your field. Create your profile, set your schedule, and begin tutoring in as few as 5 days.
Read 13 tweets
Jul 8
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. Meet atypica AI- Your 24/7 Online AI Research Team

👉 Try it now for free:

→ The AI Research Agent Simulating Consumers! Uncovers deep insights🤩

→ Atypica automatically builds personas, conducts expert interviews to generate in-depth research reports in MINUTES 🚀atypica.ai
2. 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
Read 12 tweets
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

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!

:(