FRESHER got nervous in interview🥲 ReactJS mock interview failed

  Рет қаралды 10,274

Semicolon Guy

Semicolon Guy

Күн бұрын

Пікірлер: 93
@SemicolonGuy
@SemicolonGuy 9 күн бұрын
Ye rha codesandbox link : codesandbox.io/p/devbox/hopeful-minsky-ysfk6f Question solve krke comment krke btao
@rishabhdixit4393
@rishabhdixit4393 9 күн бұрын
bhai tume ne mera github and netlify link wala comment delete mara kya ? ,because i am not able to seeit in comment
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Nhi bhai lgta hai youtube delete krdeta. Kaafi keh rhe hai
@anubhabchowdhuryproduction9149
@anubhabchowdhuryproduction9149 8 күн бұрын
@@SemicolonGuy import "./styles.css"; import { useState } from "react"; export default function App() { const [count, setCount] = useState(0); function handleCount(count: number) { if (count === 5) { alert("Yay Your seats are booked"); } } function button() { const buttons = []; for (let i = 0; i < 5; i++) { for (let j = 0; j < 5; j++) { buttons.push( { setCount(count + 1); }} key={`${i}-${j}`} > {i} {j} ); } } return buttons; } return ( Rail Tickets available seats on Train Hamsafar express {button()} handleCount(count)}>Confirm booking ); }
@TARRISHI
@TARRISHI 8 күн бұрын
import React, { useState } from 'react'; function TicketBooking() { const [grid, setGrid] = useState([ { seats: 25, category: 'general', bgColor: 'bg-red-600', col: 5 }, { seats: 64, category: 'obc', bgColor: 'bg-green-500', col: 8 }, { seats: 100, category: 'scst', bgColor: 'bg-gray-500', col: 10 }, ]); return ( {grid.map((section, sectionIndex) => ( {[...Array(section.seats)].map((_, seatIndex) => ( {seatIndex + 1} ))} ))} ); } export default TicketBooking; most optimized way to do this problem
@vishalmangla1832
@vishalmangla1832 7 күн бұрын
@SemicolonGuy here is the code also we can memoise so that unessary render stop import { useEffect, useState } from "react"; import "./App.css"; const App = () => { const [selectedData, setSelectedData] = useState({ vip: [], general: [], economy: [], }); const vip_grid_data = [1, 2, 3, 4, 5]; const general_grid_data = [...vip_grid_data, 6]; const economy_grid_data = [...general_grid_data, 7, 8]; const vip_grids = [ vip_grid_data, vip_grid_data, vip_grid_data, vip_grid_data, vip_grid_data, ]; const general_grids = [ general_grid_data, general_grid_data, general_grid_data, general_grid_data, general_grid_data, general_grid_data, ]; const economy_grids = [ economy_grid_data, economy_grid_data, economy_grid_data, economy_grid_data, economy_grid_data, economy_grid_data, economy_grid_data, economy_grid_data, ]; const handleGridSelect = (type, rowIndex, colIndex) => { const isSelected = checkSelected(type, rowIndex, colIndex); const currentSelectedData = { ...selectedData }; if (isSelected) { currentSelectedData[type] = currentSelectedData[type].filter( (item) => !(item[0] == rowIndex && item[1] == colIndex) ); setSelectedData(currentSelectedData); } else { let count = 0; count += currentSelectedData.vip.length; count += currentSelectedData.general.length; count += currentSelectedData.economy.length; if (count == 5) { alert("you cant select more tickets"); } else { currentSelectedData[type] = [ ...currentSelectedData[type], [rowIndex, colIndex], ]; setSelectedData(currentSelectedData); } } }; const checkSelected = (type, rowIndex, colIndex) => { const currentSelectedData = { ...selectedData }; const currentTypeData = currentSelectedData[type]; const filtereddata = currentTypeData.filter( (item) => item[0] == rowIndex && item[1] == colIndex ); if (filtereddata.length > 0) { return true; } else { return false; } }; const submit = () => { let string = ""; const currentData = { ...selectedData }; for (let i = 0; i < currentData["vip"].length; i++) { string += "vip" + " " + currentData["vip"][i][0] + " " + currentData["vip"][i][0] + " "; } for (let i = 0; i < currentData["general"].length; i++) { string += "general" + " " + currentData["general"][i][0] + " " + currentData["general"][i][0] + " "; } for (let i = 0; i < currentData["economy"].length; i++) { string += "economy" + " " + currentData["economy"][i][0] + " " + currentData["economy"][i][0] + " "; } alert(string); }; return ( {/* */} VIP Section (5x5) {vip_grids.map((item, rowIndex) => { return ( {item.map((value, colIndex) => { return ( handleGridSelect("vip", rowIndex + 1, colIndex + 1) } > {value} ); })} ); })} General Section (6x6) {general_grids.map((item, rowIndex) => { return ( {item.map((value, colIndex) => { return ( handleGridSelect("general", rowIndex + 1, colIndex + 1) } > {value} ); })} ); })} Economy Section (8x8) {economy_grids.map((item, rowIndex) => { return ( {item.map((value, colIndex) => { return ( handleGridSelect("economy", rowIndex + 1, colIndex + 1) } > {value} ); })} ); })} Confirm Booking ); }; export default App;
@shubhamvyavhare5664
@shubhamvyavhare5664 9 күн бұрын
Important note: Always start with UI first, then decide what states you need. Also initially think about 4-5 minutes about how's gonna be your UI and what states you will be using. So you won't have to change your code again and again. KEEP TALKING WHILE GIVING INTERVIEW, SO INTERVIEWER WILL BE ENGAGED.
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Yeeees!
@sabbir8953
@sabbir8953 2 күн бұрын
Instead of statically typed array we can use this simple array method Array.from({length:5}).map((_,idx)=>())
@AkashChowdhuryAkash
@AkashChowdhuryAkash Күн бұрын
True
@naimurrahman1406
@naimurrahman1406 Күн бұрын
new Array(5).fill(new Array(5).fill(0))
@studyplanet4656
@studyplanet4656 6 күн бұрын
One of the best interview video , i build it and it is working fine . Keep making videos ...
@sanujasethi6286
@sanujasethi6286 7 күн бұрын
This is actually tough those who are fresher.You can go for easy questions first and make them comfortable then you can ask this type of questions.
@SemicolonGuy
@SemicolonGuy 7 күн бұрын
I do this in JS round but for machine coding, i will ask the question only
@jhonsnow534
@jhonsnow534 9 күн бұрын
bhai fresher se basic ke saath output ya js ke ques poochne chaiye :(
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Hmmm. But ab sabne ratta marlia hai to application based questions laane pad rahe hai
@Amaterasoo
@Amaterasoo Күн бұрын
serious question: when i can do this with ai in literally minutes why should we go through this hassle ? and i can make it much better with the help of ai so why not?
@SemicolonGuy
@SemicolonGuy 16 сағат бұрын
It is possible to develop a product with AI, but when it comes to building a product, there will be tasks that are specific to that product. In a company, you will be building a product and that requires you to have a basic understanding of technology. Only then will you be able to find the best technical solution for your product. Additionally, debugging hundreds of coding files is currently difficult with AI. Having a good understanding of a product means you can solve technical problems more easily.
@vishalraj1834
@vishalraj1834 8 күн бұрын
ek constant folder bna lo . jis mai array of object bna lo aur use state mai pass ke do rendering UI with map , colour change krne ke liye ek function bna lo(id pass kr dena ), ek store bna lo with redux react for tracking which seat and how many seat you have booked . kis kis ko lagta h yeh theek h
@SemicolonGuy
@SemicolonGuy 7 күн бұрын
Store kyu bnana hai?
@vishalraj1834
@vishalraj1834 7 күн бұрын
@@SemicolonGuy stor can help to limit number of seat or can use to count the number of seat..
@hinata1066
@hinata1066 2 күн бұрын
especially store should made when your app is complex and multiple components have to the power to manipulate it, but in this case. you can just exploit useState hook, like think of it as: when you create a form so your input fields value is initially ""(empty). and then you update it by setState method
@vishalraj1834
@vishalraj1834 2 күн бұрын
@@hinata1066 tujhe ab car banana hai toh tu 3 tyres bhi use kr sakta aur 4 tyres ko bhi use kr sakta .. tu bta kon si best car rahegi..?
@ErrorX.
@ErrorX. Күн бұрын
@@vishalraj1834 you can use context api too redux store is for complex projects
@HBCGAMING
@HBCGAMING 8 күн бұрын
I have to delete my 400 lines of code due to one wrong approache.That,s why now i always thinking before to implement features specially those edge cases!.
@SemicolonGuy
@SemicolonGuy 7 күн бұрын
Yeees! This is very important
@shreyaspapinwar2745
@shreyaspapinwar2745 8 күн бұрын
Your attitude towards asking questions during the interview, such as 'You won't get this, why don't you understand it?', is very inappropriate. I dont think any fresher should work in this type of environment.
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Ye baat bohot bolte hai merko sab. But bhai mujhe unko WORST ke liye prepare krna hai. Agar Mai yha aakar pyaar se baat krunga to unko weak point kaise btaunga. Verdict se pehle Mera role hi ye Hai ki mujhe unko WORST ke liye prepare krna hai
@AshutoshKumar-e5g
@AshutoshKumar-e5g 2 күн бұрын
​@@SemicolonGuyto fir select kr leta 😅
@AshishVerma-yu8hp
@AshishVerma-yu8hp 7 күн бұрын
Sir i m in 12th i m currently learning web development completed html in 4-5 days . I really love ur videos hope i will be there soon ❤❤❤❤❤
@SemicolonGuy
@SemicolonGuy 7 күн бұрын
Wow very nice! Are you enjoying this journey?
@kush501
@kush501 2 күн бұрын
sir so actually i could solve ths question within 30 to 45 min ,like the hint which u gave using 2 day arrays that was much needed which took time but when i sw your optiised solution it's looks bit tricky for me 😭😭 so my question as a fresher (im still in 3rd year ) shld we go till the optiised solution ??
@harshsuthar8395
@harshsuthar8395 6 күн бұрын
Machine coding round me reactjs ka use karne deti he company?? Ya only vanilla js hi use hota he?
@rishikeshwagh392
@rishikeshwagh392 4 күн бұрын
Older way of vanilla js se react ke component banoge to pura din nikal jayega bhai. Codesandbox se ho jayega.
@ayanchatterjee9601
@ayanchatterjee9601 9 күн бұрын
Bro can u help me how can i improve my skills regarding this currently learning basic of react , hooks , use state , usecontex, use effect
@ajaydhiman9775
@ajaydhiman9775 9 күн бұрын
Make projects, that’s the only way
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Yes Ajay is right. Projects banao bhai khud se. Help km lena projects bnate time
@ayanchatterjee9601
@ayanchatterjee9601 8 күн бұрын
@@SemicolonGuy khud se try karta but bohot syntax kavi kavar bhul jata phir dekhna padta
@SemicolonGuy
@SemicolonGuy 9 күн бұрын
MOCK interview ke liye apply krna hai to comment krke btao. Mai reply me link bhejdunga apply ke liye
@udaywahi
@udaywahi 9 күн бұрын
Ha bhai mera interview ek baar lelo maine 3 year MERN stack pe kaam kiya hai still interview ke time confidence nhi aata
@piyush5070
@piyush5070 9 күн бұрын
bro, how can i prepare myself for this type of question, what i need to do or learn to solve these type of questions or problems
@jhonsnow534
@jhonsnow534 9 күн бұрын
@@piyush5070 big frontend aur great frontend interview pe mil jaenge
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Ye do platforms hai and ek aur Indian platform hai but abhi tk use nhi kia maine. Tum use krke btao kaisa hai vo : devtools.tech
@heartlyintruder
@heartlyintruder Күн бұрын
the question was easy i guess the guy got nervous
@Dr.dhumketuIITDholakpur
@Dr.dhumketuIITDholakpur 8 күн бұрын
Bhaiya maine bna to diya tha but logic sochne mai debug karne mai code karne mai 3 hrs lag gye lol , yeah mai aapki har video dekh lunga interview walo and i am sure aapki videos se changes to aainge bacause aap aache question puchte ho aaise question to bhout bdiya hai bakiyon ki tarah nahi reconciliation, virtual dom
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Ha bhai maine ye questions isliye hi start kiye hai kyuki mai chahta hu real world problem hi puche hum.
@Dr.dhumketuIITDholakpur
@Dr.dhumketuIITDholakpur 8 күн бұрын
@@SemicolonGuy ham please bnate raho mai to kuch dino se apke problems solve kar raha hun like infinite comments wala wo cars24 wala aaise bhout se and mai apki interview ke saare videos complete karne wala hun😤
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
@@Dr.dhumketuIITDholakpur wow. Btana mujhe kya improvement aayi uske baad
@Dr.dhumketuIITDholakpur
@Dr.dhumketuIITDholakpur 8 күн бұрын
@@SemicolonGuy yeah sure
@AshutoshKumar-e5g
@AshutoshKumar-e5g 2 күн бұрын
Bhai intern ko seekhaya jaata hai he is not experienced .. to think like experienced guy he have to gain experience
@deepak420re4
@deepak420re4 9 күн бұрын
Hello sir i know concepts of js like event loop, prototypical inheritance, asynchronous, hoisting, execution content,this,call,bind, apply but i want to go in these more deep as i saw some questions there my knowledge is just half . I want to do that while building projects any resources which get help me to dive above topics more perfectly
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Ye sb topic Debugging me help krte hai. Inko khud se code me implement krke dekho. Code se saath khelna start kro. Example : Event loop ke liye bohot saare timeout, setinterval aur promises likho and answer predict kro. Agar shi nhi aya to dekho kyu nhi aya. Chatgpt se puchlo
@deepak420re4
@deepak420re4 8 күн бұрын
@@SemicolonGuy thanks sir 🙂 I will go and try that!
@thehappyguy2816
@thehappyguy2816 9 күн бұрын
took me 45 minutes , im literally a fresher with 1 yr
@SemicolonGuy
@SemicolonGuy 9 күн бұрын
Bhai tumne phle 20 minutes likha tha na? 😁
@thehappyguy2816
@thehappyguy2816 8 күн бұрын
@@SemicolonGuy haan bhai, pr vo sirf mapping key liye tha, pr booking ke liye ar usko window.alert mein show krne ke liye 25 min lage😭
@qxħ
@qxħ 7 күн бұрын
What did you suggest for 11th grade starter in web dev in react js. I know basics of html css and java script. Im bug bounty hunter too.
@POLFWEB
@POLFWEB 7 күн бұрын
SIR I HAVE A QUESTION CAN IN INTERVIEWS JS OOPS CONCEPTS ARE ASKED OR NOT I PROBABLY SAWED INTERVIEWS MANY BUT NOT ANYBODY ASKING.
@SemicolonGuy
@SemicolonGuy 7 күн бұрын
There is no OOPS concept in JS, that's why Noone will ask
@POLFWEB
@POLFWEB 6 күн бұрын
@@SemicolonGuy thanks for remainder i forgot that it is just synthetic sugar 😕 behind the scenes everything is object
@bohnydua8676
@bohnydua8676 9 күн бұрын
not able to think, sir/anyone just little bit of hit to approach to selecting the seat with number row how ?
@shubhamvyavhare5664
@shubhamvyavhare5664 9 күн бұрын
3 arrays for each type of seat. Another seperate array for selected seats (If it's size is more than 5, show message limit exceed). Now I think it's pretty easy question :)
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Shubham is always very kind and helpful. Thanks for everything
@themanifesto10
@themanifesto10 9 күн бұрын
Hum first hum first
@SemicolonGuy
@SemicolonGuy 9 күн бұрын
Chaabi milgyi na?
@rengokukyojiro3290
@rengokukyojiro3290 Күн бұрын
I want to give this mock interview
@codingwave56
@codingwave56 9 күн бұрын
i want to apply for mock interview.
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Yha se apply krlo : whatsapp.com/channel/0029VaIZR09JJhzUFR2UpC12
@RoroZoro-lf4nz
@RoroZoro-lf4nz 5 күн бұрын
These are too easy questions. Bring someone more talented and ask more challenging questions please 😂. PS I did it in ~ 10 minutes
@sofisalman2135
@sofisalman2135 8 күн бұрын
I solved this problem
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Kitna time Lia tumne?
@CodeWithSumo
@CodeWithSumo 9 күн бұрын
Mujhe bhi dena hai interview
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Yha apply krlo whatsapp.com/channel/0029VaIZR09JJhzUFR2UpC12
@sagarkumargupta3071
@sagarkumargupta3071 8 күн бұрын
You failed as a interviewer.
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Please help me in succeeding
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
How can I improve?
@thehappyguy2816
@thehappyguy2816 8 күн бұрын
@@SemicolonGuy nah bro they are just too dumb for this and think that solving output based qst will get them a job🤡
@RoroZoro-lf4nz
@RoroZoro-lf4nz 5 күн бұрын
​@@SemicolonGuy You must have failed because you asked too easy questions 😂
@Yyaghs
@Yyaghs 9 күн бұрын
Mein kar dia ye pose karke
@SemicolonGuy
@SemicolonGuy 8 күн бұрын
Kitna time lga?
@Yyaghs
@Yyaghs 8 күн бұрын
@@SemicolonGuy Aprox 60 mints may be. Ak jagah syntax dekha tha google pe mein. Q ki yaad nhi tha. Par mein apki pura question na sunke start kar dia tha. To 5*5 mein 1-25 seats hoga na to seat no print karawa only. Row and column nhi.
System Design MOCK interview went CRAZY 🔥
51:06
Semicolon Guy
Рет қаралды 3,6 М.
Fresher ReactJS Mock Interview | Ticket booking system | Ep. 15
50:01
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 36 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,8 МЛН
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 44 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 25 МЛН
Best Companies to Join as a Developer in 2025
19:34
Harkirat Singh
Рет қаралды 68 М.
WIPRO engineer got REJECTED in JS mock interview | Ep. 14
48:37
Semicolon Guy
Рет қаралды 8 М.
Software Engineering Job Interview - Full Mock Interview
1:14:29
freeCodeCamp.org
Рет қаралды 1,5 МЛН
Frontend machine coding fresher mock interview | Vanilla JS | Ep.7
1:12:11
Frontend javascript fresher mock interview | Javascript | Ep.3
48:47
Learn Web Development And ACTUALLY Get A Job | Ultimate Guide
1:33:52
James Cross
Рет қаралды 1,4 МЛН
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 36 МЛН