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 21
AI is not here to replace us; it's here to enhance us.

Discover the 10 Best AI Websites for Your Device

Incredibly USEFUL and slightly sneakyโ• Hook Img
1. Photoskop

โ†’ It provides interactive photography lessons on white balance, ISO, depth of field, and exposure.

๐Ÿ”— photoskop.com
2. TeamCreate

โ†’ Build AI workers with many functions for hundreds of positions in marketing, sales, finance, and other areas.

๐Ÿ”— teamcreate.ai
Read 12 tweets
May 19
๐™ˆ๐™–๐™จ๐™ฉ๐™š๐™ง ๐™ƒ๐™๐™ˆ๐™‡ ๐™–๐™ฃ๐™™ ๐˜พ๐™Ž๐™Ž ๐™ž๐™ฃ 2024

๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™š ๐™Ž๐™ฉ๐™ง๐™ช๐™˜๐™ฉ๐™ช๐™ง๐™š๐Ÿ‘‡ Image
โžฝ ๐—•๐—ฎ๐˜€๐—ถ๐—ฐ๐˜€ ๐—ผ๐—ณ ๐—›๐—ผ๐˜„ ๐—ช๐—ฒ๐—ฏ๐˜€๐—ถ๐˜๐—ฒ๐˜€ ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€

โžฉ Client Server architecture in detail.
โžฉ What is the role of HTML in Picture and why is it used?
โžฝ ๐—•๐—ฎ๐˜€๐—ถ๐—ฐ๐˜€ ๐—ผ๐—ณ ๐—›๐—ง๐— ๐—Ÿ

โžฉ Introduction to HTML.
โžฉ HTML Syntax and Structure.
โžฉ HTML Elements and Tags.
โžฉ HTML Attributes.
Read 33 tweets
Dec 16, 2023
JavaScript Roadmap 2023๐Ÿš€๐Ÿ‘‡๐Ÿป

Mega Thread๐Ÿงต Image
Stage 1: Fundamentals
โžฝ Introduction to JavaScript

โžฉ What is JavaScript and why is it important?
โžฉ Client-side vs. Server-side JavaScript.
โžฉ Adding JavaScript to HTML pages.
Read 29 tweets
Nov 24, 2023
10 websites you have to check out if you want to learn ๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ for free.

[Bookmark ๐Ÿ”– for later] Image
๐Ÿญ. ๐—ณ๐—ฟ๐—ฒ๐—ฒ๐—–๐—ผ๐—ฑ๐—ฒ๐—–๐—ฎ๐—บ๐—ฝ. ๐—ผ๐—ฟ๐—ด

- FreeCodeCamp. org a curriculum-based platform that offers real-time coding learning and project building opportunities for users.

freeCodeCamp.org
๐Ÿฎ. ๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ ๐—ณ๐—ผ๐—ฟ ๐—ฐ๐—ฎ๐˜๐˜€

- JavaScript for Cats offers free online courses for beginners, covering basic functions, data structures, fundamental programs, and libraries.

jsforcats.com
Read 12 tweets
Oct 28, 2023
Faceless YouTube channels are one of the finest ways to make money.

Heygen and Canva have just made it extremely simple to get started.

Here's how to use AI to create faceless YouTube videos and earn money every minute.
@HeyGen_Official has partnered with @Canva to bring AI Avatars to your designs!

This is another step we took to bring AI closer to fellow creators.

Create custom AI avatars in seconds with this guide.
@HeyGen_Official @canva Step 1: Connect HeyGen to Canva in just a few clicks!

- Open Canva.
- Go to Apps and find HeyGen.
- Select it, then create a project.
- Click "Connect" to link these powerful tools together.
Read 8 tweets
Sep 8, 2023
Master Front-End Development for FREE :
Websites :
โžฉ W3schools -
โžฉ Mdn docs -
โžฉ Programiz - w3schools.com
developer.mozilla.org/en-US/
programiz.com
YouTube Channels:
โžฉ Traversy media -
โžฉ The Net Ninja -
โžฉ Code With Mosh - youtube.com/@TraversyMedia
youtube.com/@NetNinja
youtube.com/@programmingwiโ€ฆ
Read 6 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!

:(