JavaScript Tutorial in Hindi #8 | JavaScript Operators Part-2 (2025)

preview_player
Показать описание

Master JavaScript Operators Like a Pro with Mohit Decodes!

This tutorial continues our deep dive into JavaScript Operators, covering Comparison and Assignment Operators. You'll learn how these operators work and how to use them effectively in real-world coding scenarios.

✨ In This Video:
Comparison Operators:
• Equal (==), Strict Equal (===), Not Equal (!=), Strict Not Equal (!==)
• Greater Than , Less Than , Greater Than or Equal , Less Than or Equal

Assignment Operators:
• Basic Assignment (=)
• Compound Assignment (+=, -=, *=, /=, %=, **=)
• Practical use cases in JavaScript

After watching the tutorial, try these tasks to strengthen your understanding!
1. Arithmetic Operator Practice:
Write a JavaScript program that:
• Adds, subtracts, multiplies, and divides two numbers
• Calculates the remainder and exponentiation
• Increments and decrements a variable
2. Logical Operator Check:
Create a program that checks:
• If a user is either admin or editor (role === 'admin' || role === 'editor')
• Use ! to flip a boolean value
3. Comparison Operator Test:
Use different values to test:
• == vs ===
• != vs !==
• Greater than, less than, and equal conditions
4. Assignment Operator Challenge:
Start with a variable like let score = 10; and then:
• Add 5 to it using +=
• Multiply it by 2 using *=
• Subtract 3 using -=
• Show the final result

📌 Timestamps:
00:00 - Introduction
01:06 - Comparison Operators with Examples
04:42 - Assignment Operators & Their Use Cases
09:00 - Useful Info

📢 **Resources:**

📂 **Playlist Links:**

🔗 **Follow Me for Updates:**

#JavaScript #ComparisonOperators #AssignmentOperators #MohitDecodes #Programming #WebDevelopment

---
Copyright Notice:
© Mohit Decodes. All rights reserved. Unauthorized reproduction or distribution of this content is prohibited. For permissions, contact via LinkedIn or email.
Рекомендации по теме
Комментарии
Автор

JavaScript Operators – Interview Questions & Answers
Q: What are JavaScript Operators?
A: Operators are special symbols or keywords that are used to perform operations on operands (values and variables). For example: +, -, *, ==, &&.

Q: What is the difference between == and ===?
A:
== checks for value equality (performs type coercion).
=== checks for strict equality (value and type must both match).

Q: What is the difference between != and !==?
A:
!= checks inequality after type coercion.
!== checks for strict inequality (value and type must both be different).

Q: How does the && (AND) and || (OR) operator work in JavaScript?
A:
&& returns the first falsy value or the last truthy value.
|| returns the first truthy value or the last falsy one.

Q: What does the ! (NOT) operator do?
A: It inverts the truthiness of a value.
!true // false
!0 // true

Q: What are Assignment Operators? Give Examples.
A: Assignment operators assign values to variables. Examples include:
let x = 10;
x += 5; // x = x + 5
x *= 2; // x = x * 2

Q: What is the result of null == undefined and null === undefined?
A:
null == undefined → true (because of type coercion)
null === undefined → false (different types)

Q: Can you chain assignment operators?
A: Yes, you can:
let a, b, c;
a = b = c = 5; // All will be assigned the value 5

Q: What happens when you use arithmetic operators with non-numeric values?
A: JavaScript tries to convert values to numbers:
'5' - 2 // 3
'5' + 2 // '52' → String concatenation

Q: What is operator precedence in JavaScript?
A: Operator precedence determines the order in which operators are evaluated in an expression. For example, * has higher precedence than +.
let result = 10 + 5 * 2; // result = 20, not 30

Like, Share and Subscribe Please🙂

MohitDecodes
Автор

Awesome explanation...and sir please try to zoom in the screen a bit while coding, it will be easier to see clearly.. thanks

Satveersingh-jv
visit shbcf.ru