Control flow in javascript in 1 shot | chai aur #javascript

preview_player
Показать описание
#javascript #hindi
Sara code yaha milta h

Discord pe yaha paaye jaate h:
Instagram pe yaha paaye jaate h:
Рекомендации по теме
Комментарии
Автор

"Haan ji", "Koi dikkat hi nahi hai" has a seperate fan base

harsh-alashi
Автор

minor error at 28:15. If there is no break statement added before the default case, default will also be executed. In this example, the default case was not executed because the break keyword was used before it.
Thanks for this series btw..!! ❤❤❤

ankitmishra-ds
Автор

function isJavascriptHard(teacher){

if(teacher=="Hitesh Choudhary"){
console.log("Javascript is easy")
}
else{
console.log("javascript is difficult")
}
}

isJavascriptHard("Hitesh Choudhary")


🖤💙🖤

mdnaimhossen
Автор

2:13 - why control Flow?
2:54 - if-statement
5:00 - comparison operators
10:20 - "else" keyword
11:40 - difference between "var" & {"let", "const"} regarding scope.
14:42 - Implicit scope
16:17 - suggestion
17:00 - else - if
23:36 - practical use case mentioned
24:33 - switch case statement (useful in redux)
30:12 - "truthy" & "falsy" values.
33:04 - Rules of "truthy" & "falsy" consideration
37:18 - Empty array check
38:10 - Empty object check
41:00 - nullish coalescing operator
42:25 - significance of "??" operator
46:00 - confusion warning!!
48:25 - summary

mrkamboj
Автор

First time i didn't get bore in such long tutorial video, you nailed it Hitesh Sir, salute to you.

Instrumentation
Автор

🎯 Key Takeaways for quick navigation:

00:28 🧠 *Understanding data types and execution in JavaScript is crucial for building a strong foundation in programming.*
00:57 💡 *The video aims to cover control flow comprehensively within a single video, focusing on syntax and avoiding unnecessary repetition.*
01:54 🌐 *Creating files within the "04" folder, starting with a file named "$1.js" for organizing the code.*
02:09 👀 *Checking the code files to ensure that functions, scopes, and other components are correctly set up for execution.*
02:36 🔄 *Control flow or logical flow in programming should dictate when specific portions of code run based on conditions, enhancing overall program control.*
03:05 🔄 *When writing conditions, open the scope after it. The internal code inside the scope will execute only if the condition is true.*
03:31 ⚠️ *Be cautious about statements like "if false, later false." Only execute the code inside the scope if the condition is true.*
04:10 ⚖️ *Basic conditions involve checking if a value is equal, greater than, or less than another. Understand how comparisons work.*
05:00 🔄 *When comparing values, operators like "greater than, " "greater than or equal to, " and "equal to" help define conditions in your code.*
05:56 🔄 *Understand the difference between single and double equals. Single equals assigns a value, while double equals checks for equality.*
06:10 🔄 *Use "==" for checking equality in conditions, and "=" for assignment. Clarify the purpose of operators to avoid confusion.*
06:24 ❌ *Be cautious with negative statements in conditions. Verify that your negations and checks provide the expected results.*
06:38 🔄 *Conditional statements in JavaScript can be implemented using if conditions.*
07:09 📝 *Triple equals (`===`) in JavaScript checks both value and type equality.*
07:25 🚀 *Executing code based on strict type checking can be achieved using strict equality (`===`).*
09:17 🌡️ *Implementing a basic temperature check using if conditions and strict equality in JavaScript.*
10:17 🧐 *To check conditions in JavaScript, use keywords like `if` and `else`. Ensure that the conditions are correctly formulated.*
11:51 🧮 *Scope is essential; understanding global and function scope helps prevent variable conflicts and ensures code functions as intended.*
15:22 🛠️ *Use "direct" to execute code directly within the scope. Be cautious with implicit scopes; one-line execution is automatic.*
15:50 📄 *Write multi-line conditions by using common practices, and execute tests for verification.*
16:32 ❌ *Avoid impractical practices for the sake of impressing others; prioritize clean and readable code over unnecessary complexity.*
16:45 🔑 *Understanding the basics of how "if-else" conditions work in JavaScript; focus on nesting and executing conditions as needed.*
16:59 🔄 *Introduction to nesting in JavaScript; the importance of checking multiple conditions and handling scenarios with multiple conditions.*
17:27 🛠️ *Using if-else statements with greater than (>) condition to execute code.*
18:01 🧐 *Implementing multiple conditions using else-if statements.*
18:54 🧠 *Using the else statement for a final execution when no conditions are met.*
19:24 🤔 *Discussing the application of multiple conditions in real-life scenarios, such as online shopping.*
20:08 💳 *Exploring the concept of multiple conditions for user access and transaction authorization.*
21:22 🔄 *Using multiple if statements for handling various conditions.*
22:03 📝 *Implementing conditional rendering based on user details like email format, day availability, and having a debit card.*
23:19 ✔️ *Simplifying conditions by combining multiple checks, ensuring at least one condition is true.*
23:46 🛑 *Dynamically changing UI elements based on user conditions (e.g., showing login/logout buttons).*
24:14 📂 *Introduction to creating a new file and exploring different formats in JavaScript control flow.*
25:37 🔄 *Demonstrating the use of the `switch` statement with a practical example of checking values against different months.*
26:04 🔄 *Explaining the importance of using a `break` statement in each `case` to avoid fall-through in the `switch` statement.*
26:44 🔄 *Demonstrating the use of the `break` statement to prevent fall-through in a `switch` statement.*
27:14 🔄 *Discussing the default case in a `switch` statement and how it can be used to handle unmatched conditions or execute default code.*
27:42 🔄 *Understanding how control flow works in JavaScript, especially with break statements in loops.*
28:10 🐍 *Modern languages like Swift handle control flow differently, in contrast to older languages like JavaScript.*
29:05 🚧 *Demonstrating the importance of sensitivity when matching values and utilizing exact matches with the `===` operator.*
29:35 🔄 *Simplifying value comparison by using brackets and the equality operator (`===`), reducing the need for additional comparison operators.*
30:45 📁 *Creating a new file named "truth-and-error.js" for error and truth values.*
31:30 🖨️ *Discussing the challenge of printing on the web based on conditions.*
32:00 🔄 *Handling scenarios where an email is present, and the code runs successfully, exploring behind-the-scenes of the code execution.*
32:14 ❓ *Discussing an interesting situation where no comparison is made, and the code runs without checking the condition.*
32:28 🔍 *Demonstrating how to check for the existence of a true value within a string.*
32:43 🚫 *Handling scenarios where the email value is an empty string and ensuring the code works with different situations.*
33:10 📝 *Summarizing the types of truth and false values present in the code.*
33:23 ✔️ *Listing the values, including true, false, obvious false, zero, and handling special cases.*
33:50 🚧 *Clarifying that negative zero is generally considered as a false value, except in specific scenarios.*
34:18 🔄 *Null and Undefined are considered false values in JavaScript.*
34:47 🕵️ *When dealing with error values, pay attention to the "False Values" and "True Values" within the code.*
35:29 🚀 *Some error values may surprise you, so being subscribed to the channel helps in staying informed.*
35:42 📝 *When writing code within a string, be cautious about how zero and other values are interpreted as error values.*
35:56 🔍 *White spaces within strings can also be interpreted as error values, so be mindful of them.*
36:24 📜 *Function declarations without parameters or execution code inside are also considered error values.*
36:38 🧐 *Understanding how various values, including objects, are recognized as error values is crucial for developers.*
37:04 🤯 *Error values become more apparent when working on projects, emphasizing the importance of checking conditions effectively.*
38:30 🕵️‍♂️ *Detect if an object is empty by comparing its length property with zero after converting it to a string.*
38:58 🛠️ *Demonstrate the practical application of object detection in a scenario where you want to check if an object is empty.*
39:11 🤔 *Understand the basic principles of object detection and apply them to improve code efficiency.*
39:38 🔄 *Clarify the distinction between "==" and "===" operators when comparing values, and be aware of their implications.*
39:52 🧠 *Understand the outcomes of equality comparisons with "===" and "==" operators to handle truthy and falsy values effectively.*
41:18 🛠️ *The "nullish coalescing" operator checks specifically for null and undefined, providing a concise way to handle default values.*
41:36 📝 *Use the nullish coalescing operator (??) to assign a default value if a variable is null or undefined.*
44:14 🔄 *Avoid confusion between undefined and null by using nullish coalescing operator (`??`).*
44:58 ➡️ *Nullish coalescing operator is designed specifically for null and undefined, providing a convenient solution.*
45:40 🚧 *Handle errors effectively and assign values with a fundamental understanding of the process.*
46:06 🔀 *Differentiate between nullish coalescing operator, nullish collation operator, and ternary operator.*
47:40 🔄 *Basics of conditional statements in JavaScript are demonstrated, using operators like greater than (`>`).*
47:53 📏 *Comparison of values using conditional statements, emphasizing the importance of checking conditions correctly.*
48:08 🔄 *Introduction to conditional flow control with a basic example of checking if the price is less than 80.*
48:20 📝 *Summary of controlling code execution based on conditions and the need for control in different situations.*
48:49 🤔 *Understanding conditional execution based on various conditions like user ratings and temperature.*
51:10 🎭 *Introducing the concept of Nullish Coalescing Operator (`??`) for handling multiple function calls and addressing potential issues with direct value display.*
51:39 ⚠️ *Demonstrating the use of the question mark (`?`) and flag values to handle scenarios where functions may return `null` or `undefined`.*

Made with HARPA AI

Hafijur
Автор

06:37 Control flow is an important concept in JavaScript that allows the program to execute certain code based on conditions.
13:14 Control flow in JavaScript involves the use of conditional statements.
19:51 The scope of variables declared using the const and let keywords is limited to the block they are declared in
26:28 Control flow in JavaScript involves executing different portions of code based on conditions.
33:05 Understanding control flow in JavaScript
39:42 Falsy values in JavaScript include false, 0, negative 0, empty string, null, undefined, and NaN.
46:19 Understanding the concept of nullish coalescence operator in JavaScript.
52:50 The video covers control flow in JavaScript, including the ternary operator and if-else statements.

printhere
Автор

whenever i saw your youtube channel and learn programming language not only learn programming language but also understand that topic used in IT production thank you sir for making javascript series in hindi i hope the best series in youtube 😀😀😀

rahulbarik
Автор

45:59
// Another case:
let value = null ?? undefined; // Output = undefined
or
let value2 = undefined ?? null; // Output = null
// In both the cases above the second value is picked since `??` considers null and undefined equally.

akshay
Автор

I learn so much from this video....
Me jb bhi Chai or Code pr aata hu muje hmesha kuch nya sikhne ko milta hai... ❤❤

Leo-gaming-le
Автор

स्पॉइलर अलर्ट: यह वीडियो केवल फ्रेशर्स के लिए नहीं है, एक्सपायरीन्स के लोग भी इस मास्टर पीस से सीखेंगे।
- धन्यवाद हितेश

Vikram_Singh_CS
Автор

I am following this series I must say this content has one of the quality content out there on the internet. Thank you Hitesh Sir for this series.

abhishekchauhan
Автор

06:37 Control flow is an important concept in JavaScript that allows the program to execute certain code based on conditions.
13:14 Control flow in JavaScript involves the use of conditional statements.
19:51 The scope of variables declared using the const and let keywords is limited to the block they are declared in
26:28 Control flow in JavaScript involves executing different portions of code based on conditions.
33:05 Understanding control flow in JavaScript
39:42 Falsy values in JavaScript include false, 0, negative 0, empty string, null, undefined, and NaN.
46:19 Understanding the concept of nullish coalescence operator in JavaScript.
52:50 The video covers control flow in JavaScript, including the ternary operator and if-else statements.

eishanikam
Автор

Thank you for exceptional efforts in simplifying JavaScript 😇😇

ritushrivatri
Автор

Short summary at the end made all things clear!! Thanks!!

suyashjain
Автор

finally i found a write course, i really liked your method of teaching rest of videos or js playlist directly jump on advance without any basic buildup, now i m confident about my js basics .

huehuehue
Автор

the way of understanding else was just wow . 😮

NishanShrestha-np
Автор

1:37 am Hitesh Sir javascript with smile on face and calmness in voice + Lofi study music in background .I don't expect more than this .❤❤❤❤

TheSilentObserver
Автор

26:34 ==> you can also change shortcuts ==> { Settings/Keyboard Shortcuts/Select your shortcut and apply!}
Personally I use " CTRL + D "!
Thanks Me Later!😜

LegendOGLive
Автор

The iterator variable in a for...in loop is always a string. Even if you're iterating over an array (where keys are numeric indices), the iterator will be of type string. This is because JavaScript arrays are actually objects with numeric keys (indices), and property keys of any object are always strings.

since JavaScript is loosely typed, you can technically pass a string as an argument, but it will be coerced into a number if possible.

amankishore-wh
welcome to shbcf.ru