I will watch interviews from now on instead of watching tutorials. Thank you for uploading it as a post. For freshers, its not just a post its a potential unlocker video. Really helpful for upscaling the base knowledge. Respect++
Interviewer video on rakhta hai bhai and thoda serious tone me baat karta hai, ye samne vala college ka student lag rha.@@sumitjadhav1054 Sahi hai lekin fir bhi, example ke liye badhiya effort
Don't take it hard solve like a puzzle just split up the problem and solve the splited problem in code and merge the problem and merge the code boom you got it... in merge string just split problem two concate alternate string so you can use loop for minimum length string after run balance extra string we will concate it to final result using substring method...
20:00 Merge String alternately let s1 = "Hello123456"; let s2 = "World"; let finalStr = ""; for (let i = 0; i < (s1.length > s2.length ? s1.length : s2.length); i++) { if (i < s1.length) finalStr += s1.charAt(i); if (i < s2.length) finalStr += s2.charAt(i); } console.log(finalStr);
" i < (s1.length > s2.length ? s1.length : s2.length)" bro instead of this can't we just write "i < (s1.length)", i already run it showing no error, please tell why you did that ??? thank you.
for the case when second string is longer than the first string. The logic of the for loop I wrote runs for the length of the largest string, so that all the characters from both the strings are traversed.
I guess Passing null will cause an error, because i guess react expects the dependency array to be an array or to none so Null won't be valid for it! The no dependency will cause it to run after every render and empty -once on mount
Bhai string marge wale question bhut aasan tha like 5 min me ho gya tha and bhut simple logic bhi tha, aapne kuch jada hi hard kar diya use or gor se deekho uska ans fir bhi glt hi aaya hai extra 'o' aaya hai usme , but bo bat hai ki thoda pressure environment ki bat ho jata hai, barna aap bhi bad me krke dekhte to badi aasani se ho jata
31:51 const str1 = "Hello" const str2 = "World 123" function mergeString(str1, str2) { //HWeolrllod 123 let result = "" let i = 0 for (i; i < str1.length && i < str2.length; i++) { result += str1[i] + str2[i] } result += str1.substring(i) + str2.substring(i) return result } console.log(mergeString(str1, str2))
2:17 what will function return function fun1() { return 2 } function fun2() { return 4 } let a = (fun1(), fun2()); console.log(a); The comma operator is used here: (fun1(), fun2()), The comma operator executes both functions, but only the result of the last expression is returned. In this case: 1. fun1() is called first and returns 2, but this result is ignored. 2. fun2() is called next and returns 4, which is the value assigned to 'a'.
let arr = [[1, 2,[7,8]], [3, 4], [5, 6]] function flatArray(arr) { let res = [] for (let i = 0; i < arr.length; i++){ if (Array.isArray(arr[i])) { res.push(...flatArray(arr[i])) } else { res.push(arr[i]) } } return res } console.log(flatArray(arr));
I am not satisfied with the 1st answer, The variable a is not assigned twice, 2 , 3 , 'hello' // this expression returns the last value ('hello') because of the comma operator
In JavaScript, the == operator performs type coercion when the types of the operands differ. Here’s what happens step-by-step: JavaScript sees that '1' (a string) and 1 (a number) are being compared. The == operator coerces the string '1' into the number 1. Now, both sides of the comparison are 1, so JavaScript evaluates '1' == 1 as true.So, console.log('1'==1) gives True as output
I'm 19 rn and want to start with full stack web dev I'm passionate about it but I'm not confident in myself.....what should i do? I wanted to take drop from college because it's providing me with nothing cuz I'm not interested in studying commerce, I'm interested in coding since i was 15 but didn't really know where to start also my parents didn't support me and thought it was just a fling,.....I'm really demotivated and lost..
I can't comment about whether you should leave commerce or not but what I can suggest you is try to give 2 hours daily for coding and check for next 6 months.If you get joy even after coding for 6 months, then you should go ahead with the coding.
const arr=[[1,2],[3,4],[5,6]] const b=[] for (let i of arr){ if (typeof(i)==='object'){ for (let j of i){ b.push(j) } } else{ b.push(i) } } console.log(b)
Sir I am an under graduate ba general student and I have 3 years of gap for family reasons...can I start a different career like a software developer ?
function merge(str1, str2) { let mergeStr = ""; for (var i = 0; i < (str1.length + str2.length); i++) { if (i < str1.length) mergeStr = mergeStr + str1[i]; if (i < str2.length) mergeStr = mergeStr + str2[i]; } console.log(mergeStr); }
After watching this interview I'm scared I'm in 1st year of college and this looks so hard furthermore it's for freshers and they are asking so many complicated questions
@@reactjsdeveloperinterview I just took addmission in computer science, so do I have enough time? And if yes then please please help me a bit I have so many questions to ask
This is what I believe would work... function sum(a, b) { if (b !== undefined) { // If the second argument is provided, return the sum directly return a + b; } else { // If only one argument is provided, return a function that takes the second argument return function(b) { return a + b; }; } }
easy solution for merge string bro - const a = "Hello" const b = "World 1234" var ans = '' for(let i = 0; i < Math.max(a.length, b.length); i++){ if(i < a.length){ ans += a[i] } ans += b[i] } console.log(ans)
To the Interviewer: You're testing the candidate for his basic concepts of JS deeply. I've learnt new things and I thank you for that. But, when they don't answer a question or give wrong answer. kindly explain him the answer. pls don't be like, it's not my headache, 'you figure it out later'
Hi, I hope you are doing good. After the interview, I ask every candidate whatever doubts he had regarding the questions asked in the interview or any queries regarding Frontend development personally. As I am taking the interview, it should feel like an interview and not question answer session. I may answer one or two questions here and there but not all the questions.
@@gsmfurqan6509 No worries. If any queries are there, you can ask me in the comment section. I may reply late as I have my corporate work to look into.
In JavaScript, the == operator performs a comparison between two values after converting them to a common type. This process is known as type coercion. Because == doesn't check the data type(your answer goes here), it can sometimes lead to unexpected results.
var op = ' '; var a = 'HELLO'; var b = 'WORLD1234'; for(var i = 0; i < a.length || i < b.length; i++){ if (i < a.length){ op += a[i]; } if(i < b.length){ op += b[i]; } } console.log(op);
Check my code is this correct let str1 = "Hello"; let str2 = "World 1234" let out = "HWeolrllod 1234" function mergeString() { let res = ''; let combineLength = str1.length+str2.length; for(i=0; i
Thanks for the interview, Sir. I cracked a company last week
Congrats👏
@@reactjsdeveloperinterview Thank you Sir
@@AmirKhan-uh5vd which one bro
Aap hee interviewer ho video mein @@AmirKhan-uh5vd
I will watch interviews from now on instead of watching tutorials.
Thank you for uploading it as a post.
For freshers, its not just a post its a potential unlocker video.
Really helpful for upscaling the base knowledge.
Respect++
//Marge two string
let str1 = 'Hello'
let str2 = 'World'
//output = HWeolrllod;
let bag = '';
let i =0;j=0;
while(i
in the second condition use j
let str1 = 'Hello'
let str2 = 'World'
//output = HWeolrllod;
let ans="";
for(let i=0;i
No need two variables i and j, lmao. You just check if (str1[i] && str2[i]) are undefined then exit loop.
const str1 = 'hello'; const str2 = 'world';
let str = ''; let i = 0;
let str2new = ''; let str1new = '';
if (str1.length < str2.length) {
str2remain = str2.slice(str1.length);
let str2new = str2.slice(0, str1.length);
for (; i < str1.length; i++) {
str += str1[i];
str += str2new[i]
}
str += str2remain
} else if (str2.length < str1.length) {
str1remain = str1.slice(str2.length);
let str1new = str1.slice(0, str2.length);
for (; i < str2.length; i++) {
str += str2[i];
str += str1new[i]
}
str += str1remain
} else if (str1.length === str2.length) {
for (; i < str2.length; i++) {
str += str1[i];
str += str2[i];
}
};
console.log(str)
What was that i can't even understand single word😂😂😂 I will never able to understand that😂😂
It's not a real interview. It's a self interview but he delivered a good example interview.
how did you know that it wasn't a real interview?😅
@@aaishteru6709 Thanks got it 👍🏻
yeah, this is a practice interview
Interviewer video on rakhta hai bhai and thoda serious tone me baat karta hai, ye samne vala college ka student lag rha.@@sumitjadhav1054
Sahi hai lekin fir bhi, example ke liye badhiya effort
I told him so😊
Don't take it hard solve like a puzzle just split up the problem and solve the splited problem in code and merge the problem and merge the code boom you got it... in merge string just split problem two concate alternate string so you can use loop for minimum length string after run balance extra string we will concate it to final result using substring method...
20:00 Merge String alternately
let s1 = "Hello123456";
let s2 = "World";
let finalStr = "";
for (let i = 0; i < (s1.length > s2.length ? s1.length : s2.length); i++) {
if (i < s1.length) finalStr += s1.charAt(i);
if (i < s2.length) finalStr += s2.charAt(i);
}
console.log(finalStr);
function mergeAlternatively(str1, str2) {
let result = '';
const maxLength = Math.min(str1.length, str2.length);
for (let i = 0; i < maxLength; i++) {
result += str1[i] + str2[i];
}
return result;
}
const str1 = "hello";
const str2 = "world 1234";
const merged = mergeAlternatively(str1, str2);
console.log(merged);
Appreciated 👍🏻 @@James_Bond627
" i < (s1.length > s2.length ? s1.length : s2.length)" bro instead of this can't we just write "i < (s1.length)", i already run it showing no error, please tell why you did that ??? thank you.
for the case when second string is longer than the first string. The logic of the for loop I wrote runs for the length of the largest string, so that all the characters from both the strings are traversed.
const str1 = "abc2";
const str2 = "xyz13";
function addString(str1, str2) {
let minStr = Math.min(str1.length, str2.length);
let res = "";
for (let i = 0; i < minStr; i++) {
res += str1[i];
res += str2[i];
}
str1.length > str2.length
? (res += str1.substring(minStr, str1.length))
: (res += str2.substring(minStr, str2.length));
return res;
}
const res = addString(str1, str2);
console.log(res);
Bro.. the question of == and === came in the morning interview. Thanks 🤗
Dude why do we use === Tell me
@@gwwyy_ It checks if two operands are equal in the both value and in the type.
@@somaprakashrath1 ok bro thaku
@@gwwyy_ wlcm bro. And Be successful in your life ☺️
Where did you apply, lol I'm not getting any interview calls
Fantastic interview! Really helpful...
const array = [1,[3,4],[6,[7,8]]]
const stack = [...array]
const res =[]
while(stack.length){
const pope = stack.pop();
if(Array.isArray(pope)){
stack.push(...pope)
}else{
res.push(pope)
}
}
console.log(res.reverse())
//Flat array
const arr=[[1,2],[2,3],[3,4]];
function arr1(arr){
let arr1=[]
for (let i=0;i
Student communication is Better then interviewer
I guess Passing null will cause an error, because i guess react expects the dependency array to be an array or to none so Null won't be valid for it! The no dependency will cause it to run after every render and empty -once on mount
Bhai string marge wale question bhut aasan tha like 5 min me ho gya tha and bhut simple logic bhi tha, aapne kuch jada hi hard kar diya use or gor se deekho uska ans fir bhi glt hi aaya hai extra 'o' aaya hai usme , but bo bat hai ki thoda pressure environment ki bat ho jata hai, barna aap bhi bad me krke dekhte to badi aasani se ho jata
Okay bhai, Abbi toh practice kr rha hu
Okay bhai, Abbi toh practice kr rha hu
It’s good but this is planned interview i think but this is good way to present himself
finest one keep doning thankyou
People who copy and paste code have fun when this interview comes
20:00
const str1 = "Hello";
const str2 = "World";
function merge2Strings() {
let arr1 = [...str1];
let arr2 = [...str2];
let i = 0;
let length = arr1.length > arr2.length ? arr1.length : arr2.length;
let res = "";
while(i < length) {
if(arr1[i]) res += arr1[i]
if(arr2[i]) res += arr2[i]
i++;
}
return res;
}
console.log(merge2Strings());
At 37:01, it's taking null value of str1 as undefined
31:51
const str1 = "Hello"
const str2 = "World 123"
function mergeString(str1, str2) {
//HWeolrllod 123
let result = ""
let i = 0
for (i; i < str1.length && i < str2.length; i++) {
result += str1[i] + str2[i]
}
result += str1.substring(i) + str2.substring(i)
return result
}
console.log(mergeString(str1, str2))
We can also use VSCode lsp signatures to guess the output.
10:35 , it will give true
I'm really scared. What if don't come up with the answer in the interview😢
It's fine! You will only improve once you face such type of interviews.
Thanks for sharing. I love Ladakh. Good luck with your YT channel.
function mergeStrings(param1, param2) {
let mergeStr = "";
let maxlength = Math.max(param1.length, param2.length);
let suffix = "";
let sortlength = Math.min(param1.length, param2.length);
if (param1.length < param2.length) {
suffix = param2.slice(param1.length, param2.length);
} else {
suffix = param1.slice(param2.length, param1.length);
}
for (let i = 0; i < sortlength; i++) {
mergeStr = mergeStr.concat(param1[i], param2[i]);
}
if (suffix != "") {
mergeStr = mergeStr.concat(suffix);
}
return mergeStr;
}
let str1 = "hello";
let str2 = "worldABC";
hey , how much lpa can we expect from this interview ????
9/10 very good
I hope it was helpful.
This interview was for freshers or experience?
Fresher
Could you record same interview for 2,3 yr experienced ppl@@reactjsdeveloperinterview
const str1='hello';
const str2='world1234';
let str3='';
const Merge = () =>{
const min=Math.min(str1.length,str2.length)
console.log(min);
for(let i=0;istr2.length) {
str3+=str1.substring(min);
}
else{
str3+=str2.substring(min);
}
}
console.log(Merge(str1,str2))
console.log(str3);
Merge String alternatively 20:00
Thanks
2:17 what will function return
function fun1() {
return 2
}
function fun2() {
return 4
}
let a = (fun1(), fun2());
console.log(a);
The comma operator is used here: (fun1(), fun2()), The comma operator executes both functions, but only the result of the last expression is returned.
In this case:
1. fun1() is called first and returns 2, but this result is ignored.
2. fun2() is called next and returns 4, which is the value assigned to 'a'.
sir can u tell me how much java script do i have to do to before learning react
Can you do an interview for Back End Developer
let arr = [[1, 2,[7,8]], [3, 4], [5, 6]]
function flatArray(arr) {
let res = []
for (let i = 0; i < arr.length; i++){
if (Array.isArray(arr[i])) {
res.push(...flatArray(arr[i]))
} else {
res.push(arr[i])
}
}
return res
}
console.log(flatArray(arr));
Can anyone explain this? 44:52
Very helpful interview even though it is not real interview
I hope you gained some value from the interview.
47:05 Flatten Array without in built functions
const arr = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 0]];
let resultArr = [];
function arrayFlatten(val) {
if (Array.isArray(val)) val.forEach(arrayFlatten);
else resultArr.push(val);
return resultArr;
}
console.log(arrayFlatten(arr));
Excellent
Can you provide the file that he is working on
Bro u just ace it man
I am not satisfied with the 1st answer,
The variable a is not assigned twice,
2 , 3 , 'hello' // this expression returns the last value ('hello') because of the comma operator
In JavaScript, the == operator performs type coercion when the types of the operands differ. Here’s what happens step-by-step:
JavaScript sees that '1' (a string) and 1 (a number) are being compared.
The == operator coerces the string '1' into the number 1.
Now, both sides of the comparison are 1, so JavaScript evaluates '1' == 1 as true.So, console.log('1'==1) gives True as output
What package they offered you?
I'm 19 rn and want to start with full stack web dev I'm passionate about it but I'm not confident in myself.....what should i do? I wanted to take drop from college because it's providing me with nothing cuz I'm not interested in studying commerce, I'm interested in coding since i was 15 but didn't really know where to start also my parents didn't support me and thought it was just a fling,.....I'm really demotivated and lost..
I can't comment about whether you should leave commerce or not but what I can suggest you is try to give 2 hours daily for coding and check for next 6 months.If you get joy even after coding for 6 months, then you should go ahead with the coding.
const arr=[[1,2],[3,4],[5,6]]
const b=[]
for (let i of arr){
if (typeof(i)==='object'){
for (let j of i){
b.push(j)
}
}
else{
b.push(i)
}
}
console.log(b)
Isn't the interview bit long 20 30 mins is enough
no according to this job market it is sufficient
While(true){
console.log('over hear..');
}
Bhai meko dekh ke darr lag raha abb interview Dene se 😭😭
Dete time darne ka nahi bus dene ka
Interview
Lol😂@@patangbaaz8989
his voice is very loud and clear ,,,what is the headphones his using?
razer heaphones it is
I was using Razer BlackShark V2 X
Bhai job lagi salary kitni expect karte ho??@@AmirKhan-uh5vd
What was the package for this interview
₹101k
@@Jha.rishabhhh 1.1 lpa ?
Easiest interview ever witnessed
Sir I am an under graduate ba general student and I have 3 years of gap for family reasons...can I start a different career like a software developer ?
Yes, you can. For start, try for internships.
function merge(str1, str2) {
let mergeStr = "";
for (var i = 0; i < (str1.length + str2.length); i++) {
if (i < str1.length)
mergeStr = mergeStr + str1[i];
if (i < str2.length)
mergeStr = mergeStr + str2[i];
}
console.log(mergeStr);
}
const arr=[[1,2],[2,3],[3,4]];
function arr1(arr){
let arr1=[]
for (let i=0;i
After watching this interview I'm scared I'm in 1st year of college and this looks so hard furthermore it's for freshers and they are asking so many complicated questions
I can teach you
It's natural to feel like that! You have time in your hand. Just try to improve by 0.5% everyday.
@@reactjsdeveloperinterview I just took addmission in computer science, so do I have enough time? And if yes then please please help me a bit I have so many questions to ask
function merge(s1, s2) {
let s3 = ''
let i = 0
let j = 0
while (i < s1.length || j < s2.length) {
let p = s1[i++]
if(p != undefined) s3 += p
p = s2[j++]
if(p != undefined) s3 += p
}
return s3
}
Can this be also the answer cause i tried to be faster and did not optimize
Look - I wrote - the word "Function?" It don't - give any f(x) -- TTY-- you only!
can someone explain 44:39 ?
Please someone explain this. I think the interviewer was just asking to provide another currying function?
This is what I believe would work...
function sum(a, b) {
if (b !== undefined) {
// If the second argument is provided, return the sum directly
return a + b;
} else {
// If only one argument is provided, return a function that takes the second argument
return function(b) {
return a + b;
};
}
}
easy solution for merge string bro -
const a = "Hello"
const b = "World 1234"
var ans = ''
for(let i = 0; i < Math.max(a.length, b.length); i++){
if(i < a.length){
ans += a[i]
}
ans += b[i]
}
console.log(ans)
no this is mistake bro... you cannot have number
hello sir i wnat know the ans of sum((2)(3))
sum(2,3)
Is frontend developer still good to learn now? If I start learning today will I get job?
Yes! Why not...Please go ahead if you have the passion for development...
bhai shilong or mango?😅
What was the package for this job interviewed for?
50 cr
@@Kanha_kanhaasachme?
Salary??
bro can you tell me the headphone model bro... really helpful.......
Razer BlackShark v2 i guess
@@J-hf8ng thanks bro... I find it using Amazon scanner.....
Razer BlackShark V2 X
What will be the package
If you selected after this level of fantastic interview???
Please reply
3lpa
2.15 lpa
2lpa
I cracked one with 4.2 lpa with just basic html css js
Dolly Chai Wala Nothing Do this .😅😢
To the Interviewer: You're testing the candidate for his basic concepts of JS deeply. I've learnt new things and I thank you for that.
But, when they don't answer a question or give wrong answer. kindly explain him the answer. pls don't be like, it's not my headache, 'you figure it out later'
Hi,
I hope you are doing good. After the interview, I ask every candidate whatever doubts he had regarding the questions asked in the interview or any queries regarding Frontend development personally. As I am taking the interview, it should feel like an interview and not question answer session. I may answer one or two questions here and there but not all the questions.
@@reactjsdeveloperinterview thanks for letting me know. Sorry if I was rude.
if you can answer in the video itself, viewers can also learn
@@gsmfurqan6509 No worries. If any queries are there, you can ask me in the comment section. I may reply late as I have my corporate work to look into.
Bhai fresher k liye Etna lamba interview kon karta h
Exactly max 30-35 minutes if all goes well..
Ye Fresher ke liye h 😳
Yes! I asked him few hard level questions because the candidate was able to answer simple to moderate level questions easily,
Omo 😂😂😂God help me
Guy 😂
How come ur allowed to wear headphones 😂
its a fake interview bro
Get well soon!
bros more educated ig
Damn man its illogical to say that == not check data type just learn about type corecion.
In JavaScript, the == operator performs a comparison between two values after converting them to a common type. This process is known as type coercion. Because == doesn't check the data type(your answer goes here), it can sometimes lead to unexpected results.
@@GG_SYMBIOTE claps
@@aysuh-n3g not my words, from chatGPT, give it a shot, learning the difference
Sure, I'll learn that. I'd suggest you to check some of the explanations, how == and === works
Is that english ?
amir bhai linkedin ID do apna
😢itne. Tagde laval pr. Interview hota hi ni fresher ka pgl
Hota hai bro 🙃
var op = ' ';
var a = 'HELLO';
var b = 'WORLD1234';
for(var i = 0; i < a.length || i < b.length; i++){
if (i < a.length){
op += a[i];
}
if(i < b.length){
op += b[i];
}
}
console.log(op);
Check my code is this correct
let str1 = "Hello";
let str2 = "World 1234"
let out = "HWeolrllod 1234"
function mergeString() {
let res = '';
let combineLength = str1.length+str2.length;
for(i=0; i
const str1 = "Hello"
const str2 = "Pkew"
console.log(str2.charAt(0))
const max = Math.max(str1.length,str2.length)
let res= ""
for(let i=0;i
/2''pxn rtv II vkx ant < ar br pjz < sfr ba rwch < int=cjx mol/
/~8x tmp rayz wb ar br pjs < rwch 2''pxn /
/ba HUD ~8x vw < ar br alien tyl chp < par rwch h6:h2> mol i.e. cnnon/
/+ pachf-stp + df=vkx ant - at ar br pjs - sfr cjx mol - alien zfr ba - 8x tmp rayz wb/