Ajay Yadav Profile picture
Mar 27, 2022 โ€ข 11 tweets โ€ข 4 min read โ€ข Read on X
๐Ÿ’› Day 2๏ธโƒฃ6๏ธโƒฃ / 3๏ธโƒฃ0๏ธโƒฃ days of basics in JavaScript series!

โ†’ What is an array?

โ†’ How many types of creating an array?

โ†’ How to access array items & full array?

โ†’ How to change the array items?

โ†’ The data type of the array?

#javascript30

๐Ÿงตโ‡ฉ
๐Ÿ“Œ What is an array?

โ†’ It is a special variable that can be store more than one value.

โ†’ If you have multiple data items then you can use an array for storing those items.

โ†’ It can hold many values in a single variable.
โ†’ Or, storing a collection of multiple items in a single variable.

โ†’ Js array can contain mixed types of data or items, like string, decimal, float, boolean, etc.
๐Ÿ“Œ How many types of creating an array?

โ†’ There are 2 ways for creating an array for now.

1๏ธโƒฃ Using array literals
2๏ธโƒฃ Using new keyword
1๏ธโƒฃ Using array literals [ ]

โ†’ That means we can create an array using square brackets separated by semicolons.

โ†’ Space and lines are not important, they can be spanned in multiple lines.

โ†’ Generally, many people use this method for creating arrays.
2๏ธโƒฃ Using new keyword

โ†’ We can also use the new keyword for creating the array.
๐Ÿ“Œ How to access array items & full array?

๐Ÿ‘€ Access array items: We can access the items of an array using the index.

- 1st item = 0 index
- 2nd item = 1 index
- 3rd item = 2 index
- 4th item = 3 index

and so on...

โ›” Arrays index starts from 0.
๐Ÿ‘€ Access full array: We can access the full array using the name of the array.
๐Ÿ“Œ How to change the array items?

โ†’ We can change the items of the array using the index number.
๐Ÿ“Œ The data type of the array?

โ†’ It is a non-primitive data type.

โ†’ An object is the data type of the array.
๐Ÿ’š That's all for now, we will meet in the next thread!

But if you like make sure to:

1. Follow me @ATechAjay

2. Retweet the first tweet.

3. Turn on the notification to never miss these amazing tweets.

Thank you so much for staying to the end of this thread.

โ€ข โ€ข โ€ข

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

Keep Current with Ajay Yadav

Ajay Yadav 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 @ATechAjay

Sep 7
Unlocking the Secrets of Big-O Notation.

Let's see the ultimate guide: ๐Ÿงต Image
โœ… Overview of Big-O

Big-O notation is a way to describe the time-complexity of an algorithm, representing the "upper bound" of its running time in terms of the "input" size.

It provides a high-level understanding of how the algorithm's performance scales with the size of the input.

In Big-O notation, the letter "O" stands for order of magnitude. The notation is written as O(f(n)), where f(n) is a mathematical function that describes the upper bound on the running time or space complexity in relation to the input size (n).
โœ… Common Big-O Notations:

1. O(1) - Constant Time Complexity: Represents algorithms whose running time is constant, regardless of the input size. For example: Accessing an element in an array by index, basic arithmetic operations.

2. O(log n) - Logarithmic Time Complexity: Common in algorithms that divide the problem into smaller subproblems. For example: Binary search, and certain divide-and-conquer algorithms.

3. O(n) - Linear Time Complexity: The running time grows linearly with the size of the input. For example: Iterating through an array, finding the maximum element in an array.

4. O(n log n) - Linearithmic Time Complexity: Common in efficient sorting algorithms. For example: Merge sort, heap sort, etc.

5. O(n^2), O(n^3), ... Polynomial Time Complexity: The running time is a polynomial function of the input size. For example: Simple nested loops, and some sorting algorithms with poor performance.

6. O(2^n), O(n!) - Exponential and Factorial Time Complexity: Usually indicates inefficient algorithms with rapidly growing running times. For example: Recursive solutions with high redundancy.Image
Read 8 tweets
Aug 30
Browsers are the new operating systems, with 137,345 apps at your fingertips!

Here are the top 8 browser apps you won't want to miss. Image
1. Thunderbit - It offers AI-powered templates for effortless automation.

With one click, you can:
- Extract data
- Sync emails
- Generate replies
- Create social media captions, and much more.

๐Ÿ‘‰ thunderbit.comImage
2. BiRead: It's an extension that helps you overcome language barriers.

- Reading papers
- Scrolling social media
- Reading books
- Searching for travel tips
- Reading emails
- Learning a language

๐Ÿ‘‰ biread.com/?via=ajay
Read 9 tweets
Aug 14
The internet is a FREE library for books.

Top 7 websites to read or download books for FREE.

[Save these] Image
1. Google Books

Google Books offers millions of searchable books and magazines.

Browse, preview, and read full texts. Discover new titles, build your own library, and access your books across devices.

A treasure trove for readers and researchers. Image
2. PDF Drive

The world's largest free PDF book database. Browse millions of titles across genres without signup.

New books added regularly. Download and read instantly on any device. A book lover's paradise. Image
Read 8 tweets
Aug 1
You're in an interview and the interviewer asks:

"Explain the core principles of responsive web design?"

Here is how you can answer:๐Ÿงต
Responsive web design is built on 4 core principles:

1. Fluid layout
2. Responsive units
3. Flexible images
4. Media queries

Let's see one-by-one...
1. Fluid layout

Ensures web pages adapt to the viewport width and height, providing a seamless user experience on different devices.

Instead of using fixed units like pixels (px), use relative units like percentages (%), viewport height (vh), and viewport width (vw). These units adjust elements based on the current viewport size.

Utilize the property like, max-width instead of width to allow elements to resize but not exceed a specified maximum width, ensuring they fit within their container.
Read 7 tweets
Jun 20
10 Incredible AI Tools You Won't Believe Exist in 2024!

[Bookmark for later use ๐Ÿ”–] Image
1. Momen: Build Web Apps with No-Code

Momen simplifies AI app creation with user-friendly tools, easy data integration, seamless workflow integration, and customizable frontend design using a component library and infinite canvas.

go.momen.app/QJfvkTDb
2. Microsoft Loop

An online collaboration platform by Microsoft, seamlessly integrating teams, content, and tasks across apps and devices.

loop.microsoft.com
Read 12 tweets
Jun 19
Google Chrome offers 130,445 extensions, but only a few extraordinary.

These 7 will save you hours.

[Bookmark for later use ๐Ÿ”–] Image
1. Pop AI

Student's best friend for an easy life, enabling them to chat with PDF, create presentation , generate organizational charts,write,academic essays and craft killer CVs all in one platform.
2.Compose AI

Compose ai is a chrome extension that cuts your writing time in 40./. with ai powered autocompletion and text generation.
Read 9 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!

:(