53:25 the difference between let name ="hello"; and let Name = new String("hello"); is that if we print the typeof() both the string then the first one will give output as string and the second one will give the output as object. example:- let str = new String('Hello') - Converts string to object let str = 'Hello' - Maintain type (string)
30:35 We can write for loop without any conditions like for example : let i = 1; for(;;){ console.log(i); } This will run without any error and give output infinite 1s But we can use for loop by adding conditions inside loop body let i = 1; for(;;){ console.log(i); i++; if(i >= 10) break; } This will print 1 to 9
30:46 Yes, we can use a for loop without giving it a starting point (initialization), a stopping rule (condition), or a step (updation). However, this kind of loop can run forever if you're not careful. Here's an example: for ( ; ; ) { console.log("This will run forever"); } In this loop: There's no starting value. There's no rule for when the loop should stop, so it keeps going. There's no update to change anything each time it loops. To stop it from running forever, we can use a break statement to end the loop when we want: let count = 0; for ( ; ; ) { console.log(count); count++; // This increases the count each time if (count === 5) { break; // This stops the loop when count reaches 5 } } This will print numbers from 0 to 4, then stop.
We can write for loop without any conditions like for example : let i = 1; for(;;){ console.log(i); } This will run without any error and give output infinite 1s But we can use for loop by adding conditions inside loop body let i = 1; for(;;){ console.log(i); i++; if(i >= 10) break; } This will print 1 to 9
30:46 haa bhaiya hum for loop ko bina un teen conditions (initialization,condition,updation) ke likh sakte hai. example:- let i=1; for( ; ; ) { console.log(i); i++; if(i>10) break; } ye example hai 1to10 tk ki counting print karne ka without using those three confitions inside the loop body.
The three components within the for loop are optional. We can omit any of the components as per our needs. Examples - Omitting Initialization: let i = 0; for (; i < 5; i++) { console.log(i); } Omitting Condition: for (let i = 0; ; i++) { console.log(i); if (i >= 4) break; } Omitting Updation: for (let i = 0; i < 5; ) { console.log(i); i++; } Samajh aa gya bhaiya. Loved the DSA C++ series as well.❤❤❤
30:45 Bhaiya as I have studied the initializer, condition,updation are option as we can declare the variable out of the for loop too eg:- 1) let i=0 for(;I>=5;i++){ console.log(hello) }// here variable is initialized before the for loop 2)let i=0 for(;I
smjh me aa rha hai mujhe sab kuch abhi tk mai while tk pahucha huu aab break ke baad padhunga thank u bhaiy aap bahut aache pahate hai love u from nitN; abhi mera typing spped thaa 40rpm;;
00:06 Fundamental concepts on loops and strings in JavaScript 02:08 Using loops in JavaScript to avoid code duplication and maintainability issues. 05:46 Introduction to different types of loops in JavaScript 07:32 Understanding the syntax of for loops 11:18 Understanding increment operations and condition checking in loops 13:10 Understanding the for loop in JavaScript 16:51 Exploring reverse counting in a for loop in JavaScript. 18:31 Demonstration of loops and string manipulation in JavaScript 21:52 Understanding 'break' statement in JavaScript loops 23:52 Understanding loops and conditions in JavaScript 27:27 Understanding loop iterations and conditions in JavaScript 29:23 Understanding the dynamics and types of loops 33:03 Explanation of the while loop in JavaScript 34:49 Understanding loops and strings in JavaScript 38:41 Understanding loops and strings in JavaScript is crucial for proper code execution. 40:32 Understanding types of loops in JavaScript 43:54 Understanding the logic of loops in JavaScript 45:40 Understanding the do-while loop in JavaScript 49:15 Understanding the concept of strings in JavaScript 50:52 Introduction to different ways of creating strings in JavaScript 54:51 Understanding string concatenation and backticks usage in JavaScript 56:35 Accessing values inside backticks in JavaScript 59:57 Understanding indexing and string manipulation in JavaScript 1:01:42 Understanding substring method and split method in JavaScript 1:05:39 Understanding the usage of backslashes in JavaScript strings 1:07:23 Using backslash as a special character in JavaScript
No, In JavaScript, you have the flexibility to omit any or all parts of the for loop as needed for your specific use case. Just keep in mind that clarity and readability are important. example : // With all three parts for (let i = 0; i < 5; i++) { console.log(i); } // Omitting initialization let j = 0; for (; j < 5; j++) { console.log(j); } // Omitting condition for (let k = 0; ; k++) { if (k >= 5) { break; } console.log(k); } // Omitting update for (let l = 0; l < 5;) { console.log(l); l++; }
30:39 i ko initialize karna hi padega and condition bhi jaruri hai, but increment operator nahi lagane per yah execute to ho jayega lekin infinite loop ban jayega, isliye yah bhi jaruri ho jata hai as a good practice.
bahut khub Babbar bhaiya maza aa gaya loops me; pura concept clear for loop without using any initialisation , condition or updation it is a infinite loop
53:20 jab hum string ka variable bnaty hain to wo stack main banta ha jo kay run time sy pehly storage assign hti ha matlab compile time pay.jab hum new keyword use kerty hain to memory heap main banti ha runtime pay aur dusri baat yay kay new string aik string class ka object bnata ha runtime pay jis sy hum us string class ki sari properties ko use ker sken gy
Hum likh skte for loop without any conditions let i = 1; for(;;){ console.log(i); } This will run without any error and give output infinite 1s But we can use for loop by adding conditions inside loop body let i = 1; for(;;){ console.log(i); i++; if(i >= 10) break; } Output 1 to 9 Answer of 30:35
HW ANSWER yes we can use for loops without the any of three conditions but should be the semicolons that maintain the syntax of the for loop for(; ; ;){ }
@@CodeHelphamare purane love bhaiya koshish nhi kiya karte the, wo unka by default feature tha ki course complete karna ha toh karna ha pta nhi ye kon ha jo koshish kar rhe ha despite of all of these respect you man ho ske toh saath end tak nibhana god bless you❤
@@01_Priyanshu Course toh complete krunga hi bro, karna chahta hu mnn se. Beech me itna Gap hogya toh thora uncomfortable hu bss or kuch nhi. Jo kaha h vo definitely hoga
Yes in for loop all three value is important like updation initialisation and starting condition. All three value carry importance in their field . If any value is missing the loop was not completed properly updation condition says value must be updated on every iteration . Initialisation says at which value we will take start at what value . Stopping condition says at which place or digit we run a loop .
Thanks Bhaya. Pls series continuesly raky hr din aik video upload kry gap na dena pls. ap buhut achy samjaty hai buhut easy hota hai or concept fully clear rhta hai jo ap ny parhaya hota hai
30:35 ============================================ without any conditions : let i = 7; for(;;){ console.log(i); } This will run without any error and give output infinite 7s adding conditions inside loop body let i = 1; for(;;){ console.log(i); i++; if(i >= 7) break; } This will print 1 to 6
boht bdiaa pdaya bhaiya aapne number 1 explanation with full of practical experience thanks bhaiya❣❣ Bhagwaan apko hmesha khush rkhe or aap hmare liye aise he kaam krte rhe.. Dhanyawaad
At 50:30, let firstName = "Rakesh"; is String primitive, this is Immutable, these are Stored in the Memory directly. where as let firstName = new String("Rakesh"); is String Object, this is Mutable, this not Efficient for Memory Management when compare to String Primitives.
The initialization statement in a for loop is used to initialize the loop counter variable, which is typically used to control the loop's execution. Without an initialization statement, the loop counter variable will not have a value, and the loop will not have any way to know how many times it should execute.
let name = "love babbar"; creates a primitive string-simple, efficient, and directly stored in memory. let name = new String("babbar"); creates a String object, which is unnecessary overhead in most cases and leads to slower performance.
Babbar bhaiya ek humble request please jaldi jaldi series complete kara dena, placement start hone wale hai or development k naam pe bs lecture 43 tak hi ata h
let firstName = new String("love babbar"); This creates a String object using the new String() constructor. Even though it looks like a string, it is not a primitive string, but rather a complex object. Since it's an object, it has properties and methods that primitive strings do not have. Example: typeof firstName will return "object". let firstName = "Love Babbar"; This creates a primitive string. It's the most common and recommended way to declare strings in JavaScript. A primitive string is simpler and faster to use than a String object. Example: typeof firstName will return "string" In most cases, you should use primitive strings (let firstName = "Love Babbar";) because they are lightweight and more efficient than String objects (new String()). String objects are rarely needed unless you specifically require the object-based behavior (which is uncommon).
The difference is that when we are{ let firstName="shiavni"; }(This is the normal creation of string ) but when we are create string in this form let name=newString("hello shivani"); in this way it create string in the form of object.
in donu ma difference ya ha ka first wali strings ju han wo static memory ma store ho rahi han and jo 'new' liga ka create ki gaye ha wo heap ma ban rahi ha
53:25 the difference between let name ="hello"; and let Name = new String("hello"); is that if we print the typeof() both the string then the first one will give output as string and the second one will give the output as object.
example:-
let str = new String('Hello') - Converts string to object
let str = 'Hello' - Maintain type (string)
30:35
We can write for loop without any conditions
like for example :
let i = 1;
for(;;){
console.log(i);
}
This will run without any error and give output infinite 1s
But we can use for loop by adding conditions inside loop body
let i = 1;
for(;;){
console.log(i);
i++;
if(i >= 10)
break;
}
This will print 1 to 9
30:46 Yes, we can use a for loop without giving it a starting point (initialization), a stopping rule (condition), or a step (updation). However, this kind of loop can run forever if you're not careful.
Here's an example:
for ( ; ; ) {
console.log("This will run forever");
}
In this loop:
There's no starting value.
There's no rule for when the loop should stop, so it keeps going.
There's no update to change anything each time it loops.
To stop it from running forever, we can use a break statement to end the loop when we want:
let count = 0;
for ( ; ; ) {
console.log(count);
count++; // This increases the count each time
if (count === 5) {
break; // This stops the loop when count reaches 5
}
}
This will print numbers from 0 to 4, then stop.
We can write for loop without any conditions
like for example :
let i = 1;
for(;;){
console.log(i);
}
This will run without any error and give output infinite 1s
But we can use for loop by adding conditions inside loop body
let i = 1;
for(;;){
console.log(i);
i++;
if(i >= 10)
break;
}
This will print 1 to 9
30:46 haa bhaiya hum for loop ko bina un teen conditions (initialization,condition,updation) ke likh sakte hai. example:-
let i=1;
for( ; ; )
{
console.log(i);
i++;
if(i>10)
break;
}
ye example hai 1to10 tk ki counting print karne ka without using those three confitions inside the loop body.
The three components within the for loop are optional. We can omit any of the components as per our needs.
Examples -
Omitting Initialization:
let i = 0;
for (; i < 5; i++) {
console.log(i);
}
Omitting Condition:
for (let i = 0; ; i++) {
console.log(i);
if (i >= 4) break;
}
Omitting Updation:
for (let i = 0; i < 5; ) {
console.log(i);
i++;
}
Samajh aa gya bhaiya. Loved the DSA C++ series as well.❤❤❤
Very thankful for being like a brother for explaining all skills
30:45 Bhaiya as I have studied the initializer, condition,updation are option as we can declare the variable out of the for loop too
eg:-
1) let i=0
for(;I>=5;i++){
console.log(hello)
}// here variable is initialized before the for loop
2)let i=0
for(;I
bhai kasam se aaj tak kisi ne itni achi trah se loop ni samjaya.... love you bhai😘😘
smjh me aa rha hai mujhe sab kuch abhi tk mai while tk pahucha huu aab break ke baad padhunga thank u bhaiy aap bahut aache pahate hai love u from nitN; abhi mera typing spped thaa 40rpm;;
00:06 Fundamental concepts on loops and strings in JavaScript
02:08 Using loops in JavaScript to avoid code duplication and maintainability issues.
05:46 Introduction to different types of loops in JavaScript
07:32 Understanding the syntax of for loops
11:18 Understanding increment operations and condition checking in loops
13:10 Understanding the for loop in JavaScript
16:51 Exploring reverse counting in a for loop in JavaScript.
18:31 Demonstration of loops and string manipulation in JavaScript
21:52 Understanding 'break' statement in JavaScript loops
23:52 Understanding loops and conditions in JavaScript
27:27 Understanding loop iterations and conditions in JavaScript
29:23 Understanding the dynamics and types of loops
33:03 Explanation of the while loop in JavaScript
34:49 Understanding loops and strings in JavaScript
38:41 Understanding loops and strings in JavaScript is crucial for proper code execution.
40:32 Understanding types of loops in JavaScript
43:54 Understanding the logic of loops in JavaScript
45:40 Understanding the do-while loop in JavaScript
49:15 Understanding the concept of strings in JavaScript
50:52 Introduction to different ways of creating strings in JavaScript
54:51 Understanding string concatenation and backticks usage in JavaScript
56:35 Accessing values inside backticks in JavaScript
59:57 Understanding indexing and string manipulation in JavaScript
1:01:42 Understanding substring method and split method in JavaScript
1:05:39 Understanding the usage of backslashes in JavaScript strings
1:07:23 Using backslash as a special character in JavaScript
No, In JavaScript, you have the flexibility to omit any or all parts of the for loop as needed for your specific use case. Just keep in mind that clarity and readability are important.
example :
// With all three parts
for (let i = 0; i < 5; i++) {
console.log(i);
}
// Omitting initialization
let j = 0;
for (; j < 5; j++) {
console.log(j);
}
// Omitting condition
for (let k = 0; ; k++) {
if (k >= 5) {
break;
}
console.log(k);
}
// Omitting update
for (let l = 0; l < 5;) {
console.log(l);
l++;
}
30:39 i ko initialize karna hi padega and condition bhi jaruri hai, but increment operator nahi lagane per yah execute to ho jayega lekin infinite loop ban jayega, isliye yah bhi jaruri ho jata hai as a good practice.
bahut khub Babbar bhaiya maza aa gaya loops me; pura concept clear
for loop without using any initialisation , condition or updation it is a infinite loop
53:40
In above statement the allocation is static whereas in last statement we are allocating memory in dynamic way using new keyword.
53:20 jab hum string ka variable bnaty hain to wo stack main banta ha jo kay run time sy pehly storage assign hti ha matlab compile time pay.jab hum new keyword use kerty hain to memory heap main banti ha runtime pay aur dusri baat yay kay new string aik string class ka object bnata ha runtime pay jis sy hum us string class ki sari properties ko use ker sken gy
understood everything! Thanks so much for making us understand everything so well..!
01:30= Loops , 05:40= Types of Loops,
All Clear sir your way of teaching is too good
Hum likh skte for loop without any conditions
let i = 1;
for(;;){
console.log(i);
}
This will run without any error and give output infinite 1s
But we can use for loop by adding conditions inside loop body
let i = 1;
for(;;){
console.log(i);
i++;
if(i >= 10)
break;
}
Output 1 to 9
Answer of 30:35
HW ANSWER
yes we can use for loops without the any of three conditions but should be the semicolons that maintain the syntax of the for loop
for(; ; ;){
}
zyada excited mat ho jawo kuch din bad fir sy long time no see ho jana ha 😂😂
Koshish poori hai aisa na ho
Thoda sa kripa hamlogo par bhi kr dijiye apne superme batch ki tarah importance dekar to sayad aisa na ❤🙏
@@CodeHelphamare purane love bhaiya koshish nhi kiya karte the, wo unka by default feature tha ki course complete karna ha toh karna ha pta nhi ye kon ha jo koshish kar rhe ha despite of all of these respect you man ho ske toh saath end tak nibhana god bless you❤
@@01_Priyanshu Course toh complete krunga hi bro, karna chahta hu mnn se.
Beech me itna Gap hogya toh thora uncomfortable hu bss or kuch nhi.
Jo kaha h vo definitely hoga
@@CodeHelpmuze pata hai ki ye course jarur complete hoga aur consistency ke sath pura hoga don't worry subscribers
Yes in for loop all three value is important like updation initialisation and starting condition. All three value carry importance in their field . If any value is missing the loop was not completed properly updation condition says value must be updated on every iteration .
Initialisation says at which value we will take start at what value .
Stopping condition says at which place or digit we run a loop .
Check out 30:35
We can write get output Without Initialization of i
let i = 0;
for (; i
Thanks Bhaya. Pls series continuesly raky hr din aik video upload kry gap na dena pls. ap buhut achy samjaty hai buhut easy hota hai or concept fully clear rhta hai jo ap ny parhaya hota hai
what a nice class . Great content 💯
Best teacher on TH-cam ❤😊
30:35
============================================
without any conditions :
let i = 7;
for(;;){
console.log(i);
}
This will run without any error and give output infinite 7s
adding conditions inside loop body
let i = 1;
for(;;){
console.log(i);
i++;
if(i >= 7)
break;
}
This will print 1 to 6
boht bdiaa pdaya bhaiya aapne number 1 explanation with full of practical experience thanks bhaiya❣❣ Bhagwaan apko hmesha khush rkhe or aap hmare liye aise he kaam krte rhe.. Dhanyawaad
on of the best playlist for beginners
I love to learn with you sir. Hats off to your teaching..🤗😎
Understood bhaiya🔥🔥
bhiaya sahi padhaya samaz me aaraha he ❤
At 50:30,
let firstName = "Rakesh"; is String primitive, this is Immutable, these are Stored in the Memory directly.
where as
let firstName = new String("Rakesh"); is String Object, this is Mutable, this not Efficient for Memory Management when compare to String Primitives.
Understood perfectly 👌
Samajh aa gaya bhaiya, dosto go for it is good infinity
sahi padhaya bhaiya samajh main aa raha hai
good job keep it up 26-10-2024 this lecture complete..
30:39
let a=1;
for (;a
Bht bht bariya ....
Best Hogya Bhaiya G
best bhaiya . smaj me aagyaaa❤❤❤❤❤
Wow nice one.!! WELL EXPLAINED 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩
bhiya bhot sahi prhaty ho ap❤❤❤
great video sir please now continue the series
Awesome course🙂
The initialization statement in a for loop is used to initialize the loop counter variable, which is typically used to control the loop's execution. Without an initialization statement, the loop counter variable will not have a value, and the loop will not have any way to know how many times it should execute.
thank you for tutorials sir , they are very useful and easy to understand.
50:30 last
Thank you bhaiyya samjh aaya
Understood ++
Respect ++
Understood++💯🔥
understand ++, thank you Bhaiya..
Mast ❤
Bhaiya sab acche se samaj mai aa raha hai
bhaiya sahi padhaya samjh aa rha hai
Sir Samajh me aa gya 🙂🙂🙂🙂
Great content delivery 🙏🙏
Thank you❤
Love Bhaiya.. video ke last me..., topic ke related..., kuch practice questions be add kr diya kro ..🌞
Bhaiya I really love you in a good way ❤️
Js playlist vi strt kr di bhaiya ne 🔥🔥
Amazing sir
Teaching skill you have excellent. Har din video dalo
thanks bhaiya for your love and supports for the students🥳
Episode - 08 : 04-11-2024
Episode - 09 : 14-11-2024
Episode - 10 : 14-11-2024
Episode - 11 : 19-11-2024
Episode - 12 : 21-11-2024
Episode - 13 : 21-11-2024
Episode - 14 : 22-11-2024
Episode - 15 : 23-11-2024
Episode - 16 : 23-11-2024
Episode - 17 : 23-11-2024
Episode - 18 : 23-11-2024
Episode - 19 : 25-11-2024
Episode - 20 : 26-11-2024
Episode - 21 : 27-11-2024
Episode - 22 : 28-11-2024
Episode - 23 : 29-11-2024
Episode - 24 : 29-11-2024
Episode - 25 : 29-11-2024
Episode - 26 : 30-11-2024
Episode - 27 : 02-12-2024
Episode - 28 : 03-12-2024
Episode - 29 : 03-12-2024
Episode - 30 : 04-12-2024
Episode - 31 : 05-12-2024
Episode - 32 : 05-12-2024
Episode - 33 : 06-12-2024
Episode - 34 : 07-12-2024
Episode - 35 : 08-12-2024
Episode - 36 : 08-12-2024
Episode - 37 : 08-12-2024
Episode - 38 : 09-12-2024
Episode - 39 : 09-12-2024
Episode - 40 : 10-12-2024
Episode - 41 : 11-12-2024
Episode - 42 : 11-12-2024
mja aa gya
✅ Done
Thanks bhaiya smj aa gya 🎉
let name = "love babbar"; creates a primitive string-simple, efficient, and directly stored in memory.
let name = new String("babbar"); creates a String object, which is unnecessary overhead in most cases and leads to slower performance.
Very helpful
kya baat ha babbar bhai
Nice tutorial
Thank You Bhaiya
great learning bro
Babbar bhaiya ek humble request please jaldi jaldi series complete kara dena, placement start hone wale hai or development k naam pe bs lecture 43 tak hi ata h
Maza aa gya
sahi padhaya hai samajh mai araha hai
😁
In for-loop only condition is mandatory
let i = 0;
for (; i < 5;) {
console.log(i);
i++
}
bhaiya thank u for coming
let firstName = new String("love babbar");
This creates a String object using the new String() constructor. Even though it looks like a string, it is not a primitive string, but rather a complex object.
Since it's an object, it has properties and methods that primitive strings do not have.
Example: typeof firstName will return "object".
let firstName = "Love Babbar";
This creates a primitive string. It's the most common and recommended way to declare strings in JavaScript.
A primitive string is simpler and faster to use than a String object.
Example: typeof firstName will return "string"
In most cases, you should use primitive strings (let firstName = "Love Babbar";) because they are lightweight and more efficient than String objects (new String()). String objects are rarely needed unless you specifically require the object-based behavior (which is uncommon).
Thanks
thanks bhaiya
understood bhaii jiii
The difference is that when we are{ let firstName="shiavni"; }(This is the normal creation of string ) but when we are create string in this form let name=newString("hello shivani"); in this way it create string in the form of object.
Thank you so much sir
Congratulations bhaiya for 2 years anniversary!!!!!!!!!!
Respect Button for LOVE BABBAR ❤❤❤❤❤❤
Thanks a lot bhaiji 👍👏 bolne wale to bolte rahte h or kaam hi kya h unka
Thanks sir for uploading daily videos , please sir be consistent for your youtube army
in donu ma difference ya ha ka first wali strings ju han wo static memory ma store ho rahi han and jo 'new' liga ka create ki gaye ha wo heap ma ban rahi ha
maza aa gya
thanks for the video
Nice Bhaii
I m waiting this video❤
han a gya samjh
Samajh mai aa rha hai!
Enhanced for loop se kar sakte hai!
Good evening guru ji 🎉
I is not mandatory to write specify all the 3 terms in for loop
Here it is an example
let k=0;
for(;k
samajh aaya bhaiya