Ajay Yadav Profile picture
Mar 11, 2022 β€’ 14 tweets β€’ 5 min read β€’ Read on X
πŸ’› Day 1️⃣1️⃣ / 3️⃣0️⃣ days of basics in JavaScript series

β†’ Arithmetic operator?

β†’ Prefix & Postfix operator?

β†’ Assignment operator?

β†’ Comparision operator?

β†’ == VS === operator?

β†’ Logical operator?

β†’ String operator?

#javascript30

Let me explain!πŸ§΅πŸ‘‡
πŸ“Œ Arithmetic operator?

β†’ It is used to perform mathematical calculations.

πŸ‘€ +, -, %, *, **, etc

β†’ ** is a square operator or power operator.

πŸ‘€ 2**3 = 2x2x2
β†’ % is a modulus operator, not a percentage.

β†’ It is used to find the remainder of an expression.

πŸ‘€ 11 % 10 = remainder ( 1 )
πŸ“Œ Prefix & Postfix operator?

β†’ One special operator is an increment or decrement operator in any programming language.

β†’ There are 2 types of increment or decrement operators.

1️⃣ Prefix
2️⃣ Postfix

πŸ“Œ Pre means Before (like prepaid)
πŸ“Œ Post means After (like postpaid)
1️⃣ Prefix: Prefix increment or decrement the value and returns a "new" value.

2️⃣ Postfix: Postfix increment or decrement the value and returns an "old" value.

β›” This operator only applied to variables, not on values!!!
πŸ“Œ Assignment operator?

β†’ It is used to assign value to a variable.

πŸ‘€ =, +=, -=, *=, **=, etc.

β†’ "+=" This operator activates at the same time.

πŸ‘€ c *= 10??πŸ‘‡
πŸ“Œ Comparision operator?

β†’ This operator compares 2 values and returns a boolean value.

β†’ true and false are boolean values.
πŸ“Œ == VS === operator?

β†’ In javascript, there are 2 types of equality operators.

1️⃣ Loose equality operator ( == )

β†’ When we compare between 2 values then the "data types" of that variables are not considered.

β›”In short: only data is compared with loose equality operators.
2️⃣ Strict equality operator ( === )

β†’ When we compare between 2 values then the "data types" of that variables are also considered.

β›” In short: data and data types both are compared with strict equality operators.
πŸ“Œ Logical operator?

β†’ It's used to perform logical operations & return a boolean value.

β†’ && (AND) : true when both values are true.
β†’ || (OR): true when both or only one value are true.
β†’ ! (NOT): if true then false or vice-versa.

β›” More about in the upcoming thread!
πŸ“Œ String operator?

β†’ You can use the + operator to add 2 or more strings.

β†’ Its also known as concatenation.
β†’ Or you can also use the addition assignment( +=) operator for adding the strings.
πŸ“ŒAccess previous threads from this Twitter moment.

twitter.com/i/moment_maker…
πŸ’š 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!

:(