top 10 JavaScript tricks

  Рет қаралды 19,266

techsith

techsith

Күн бұрын

Пікірлер: 85
@IvanHaha
@IvanHaha 3 жыл бұрын
Tricks like `a = (b+= a -=b) - a;` are pretty neat but people really need to ask themselves: 1. What do I value more, short code or readable code? 2. Am I the only person who's going to work with this code and if not, are they going to understand my code, am I going to understand this code in a month?
@Techsithtube
@Techsithtube 3 жыл бұрын
Ivan, As I said in the video, this particular trick is not to use in the code , its for interview question.
@antrasinha8045
@antrasinha8045 2 жыл бұрын
a= a + b; b= a - b; a= a - b; Same code but neat/understandable.
@BeyondWithAlireza
@BeyondWithAlireza 3 жыл бұрын
Tech sith is back finally :)
@Techsithtube
@Techsithtube 3 жыл бұрын
Ali, glad to be back! Thanks for watching!
@amazecreations1853
@amazecreations1853 3 жыл бұрын
Great content, explained in simple way, really underrated channel.
@akifcankara2225
@akifcankara2225 2 жыл бұрын
We can use user-select: all; css for 5:12
@alinawaz4034
@alinawaz4034 3 жыл бұрын
14:00 there is a simpler solution to compare 2 arrays, and you can also compare 2 objects or any primitive values const compare = (a,b) => JSON.stringify(a) === JSON.stringify(b)
@Techsithtube
@Techsithtube 3 жыл бұрын
yes that is a good solution. Thanks for sharing!
@karlstenator
@karlstenator 2 жыл бұрын
Very cool tips, thanks for sharing! ☕
@sumodsivadas6959
@sumodsivadas6959 3 жыл бұрын
Awesome videos, i always suggest your videos to my friends, thanks for making these.... ❤️
@Techsithtube
@Techsithtube 3 жыл бұрын
Sumod, so nice of you to share my videos with your friends. :) THanks for watching!
@philsitumorang
@philsitumorang 2 жыл бұрын
This is really usefull! Thank you so much!
@azamatgiyasov5033
@azamatgiyasov5033 Жыл бұрын
Great content
@sireeshakuna5686
@sireeshakuna5686 3 жыл бұрын
Great video again, thank you 👍
@Techsithtube
@Techsithtube 3 жыл бұрын
Thanks again!
@abhishekvishwakarma9045
@abhishekvishwakarma9045 3 жыл бұрын
Thanks for this I recently found your channel (After badly performed in a Js interview 😅 but still I cleared it) , Interviewer asked me a question related to Object.freeze() and Today just found the same question in one of your videos, worth it content and your teaching is also so cool 🔥😁.
@AmarjeetKumar-xr2gf
@AmarjeetKumar-xr2gf 3 жыл бұрын
Hi need a help can you help in creating two separate react project each has there own routing and redux ...and there is a third react project where you have buttons to navigate two different project ...it would be great if you come up with some example video of same..thank you
@Techsithtube
@Techsithtube 3 жыл бұрын
There are multiple ways to do it. create three separate projects with their own routing and all . when you do "npm start" , load them on different port . then create a third project with button and links to the URL with different ports.
@AmarjeetKumar-xr2gf
@AmarjeetKumar-xr2gf 3 жыл бұрын
@@Techsithtube thanks for the response....but no we should have only one port ...for example... localhost:3000/main page Then on click of project2 is should be Localhost:3000/project1 and inside project one if we navigate to projectdetail the path should be project/projectdetail
@vakhtangnodadze4947
@vakhtangnodadze4947 3 жыл бұрын
Your content is simple but GREAT. You are explaining interesting and important topics very understandable. I just wanted you to know that. You really deserve more views and subs. Thank you for taking the time
@Techsithtube
@Techsithtube 3 жыл бұрын
Vakhtang, I appreciate the awesome comment. Thanks for watching!
@rupambasak6435
@rupambasak6435 3 жыл бұрын
Your teaching is best for me. Thanks. keep growing and let us updated
@Techsithtube
@Techsithtube 3 жыл бұрын
Rupam, so nice of you.
@junfengou6856
@junfengou6856 3 жыл бұрын
So glad I stumbled across this channel, thanks for all these useful tips
@icyheat1463
@icyheat1463 2 жыл бұрын
Great video, just one thing: Document.execCommand() is now deprecated, and we should use the Clipboard API instead.
@ibtesamuddin2061
@ibtesamuddin2061 2 жыл бұрын
thanks a lot for such great videos 🤩 already subscribed ⭐
@lone-warrior-13
@lone-warrior-13 3 жыл бұрын
really useful tricks, thanks
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad it was helpful!
@ConnorAZ
@ConnorAZ 3 жыл бұрын
Techsith is always awesome and its always a pleasure talking to you over on twitter..Talking about different conspiracy and thoughts about JavaScript and our developer ecosystem
@Techsithtube
@Techsithtube 3 жыл бұрын
I enjoy it too. Thanks for watching!
@VipinRawat_Offcial
@VipinRawat_Offcial 3 жыл бұрын
Most of the tricks are new for me.. amazing 👌👌
@Techsithtube
@Techsithtube 3 жыл бұрын
Vipin, Glad to hear that. Thanks for watching!
@aliezadkhaha9439
@aliezadkhaha9439 3 жыл бұрын
Very nice
@vasanthakumarnagamuthu3106
@vasanthakumarnagamuthu3106 3 жыл бұрын
Excellent Video. Thanks for providing such a wonderful tricks. One small deviation at 14:54 is value.some(Boolean) - checks if there is any non empty values and returns true. But your context mentioned in the other way. Thanks!
@skylarkendrick656
@skylarkendrick656 3 жыл бұрын
you probably dont care at all but does someone know a trick to get back into an Instagram account?? I somehow forgot the password. I would love any help you can offer me
@stetsondavian5756
@stetsondavian5756 3 жыл бұрын
@Skylar Kendrick instablaster :)
@skylarkendrick656
@skylarkendrick656 3 жыл бұрын
@Stetson Davian i really appreciate your reply. I found the site thru google and im waiting for the hacking stuff atm. Seems to take a while so I will reply here later with my results.
@skylarkendrick656
@skylarkendrick656 3 жыл бұрын
@Stetson Davian It did the trick and I now got access to my account again. I'm so happy:D Thanks so much, you saved my ass !
@stetsondavian5756
@stetsondavian5756 3 жыл бұрын
@Skylar Kendrick You are welcome =)
@dipeshranavlogs
@dipeshranavlogs 3 жыл бұрын
Great 👌
@Techsithtube
@Techsithtube 3 жыл бұрын
Thanks for liking. :)
@GS-tx8ib
@GS-tx8ib 3 жыл бұрын
I wish you brought back the javascript interviews series, in those videos I always learn something new
@Techsithtube
@Techsithtube 3 жыл бұрын
Yes, I am planning to make some more such videos. I do have another channel which focuses on interviews , its interviewnest do check it out.
@rishireddy7854
@rishireddy7854 3 жыл бұрын
Tech sith can we expect JavaScript coding questions tutorials
@rahulk.creative
@rahulk.creative 3 жыл бұрын
These tricks are really helpful....thanks for the awesome video😊
@Techsithtube
@Techsithtube 3 жыл бұрын
Rahul, Glad you like them! Thanks for watching!
@Vijay-Yarramsetty
@Vijay-Yarramsetty 3 жыл бұрын
That was great video
@varaprasad4163
@varaprasad4163 3 жыл бұрын
Guru is back.
@Techsithtube
@Techsithtube 3 жыл бұрын
Thanks Prasad. :)
@aqumus
@aqumus 3 жыл бұрын
As per MDN, execCommand is deprecated or may be deprecated, also browser support is not that great (would be good to have this as a disclaimer)
@angel_ruggia
@angel_ruggia 3 жыл бұрын
Your videos are amazing!
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad you like them! Thanks for watching buddy!
@kirankumarahir7933
@kirankumarahir7933 3 жыл бұрын
Nice tricks
@Techsithtube
@Techsithtube 3 жыл бұрын
Thanks for watching!
@rajashekhar433
@rajashekhar433 3 жыл бұрын
Can you please make a video on CI/CD?
@sakshisharma8660
@sakshisharma8660 3 жыл бұрын
Thanks for these tricks😊
@Techsithtube
@Techsithtube 3 жыл бұрын
Sakshi, My pleasure!! Glad to hear that. Thanks for watching!
@ahsanfraz9105
@ahsanfraz9105 3 жыл бұрын
What where the swap variable valuele value just shift the variable itself , i simplify this u couldnt swap variable value wdout passing by it ref
@Techsithtube
@Techsithtube 3 жыл бұрын
can you explain this in detail.
@ahsanfraz9105
@ahsanfraz9105 3 жыл бұрын
Absoultly value is imutable then plz define me how it modified but if you talk in static type languages like c# java c+, then pass those variable by reference if you dont them it only remain in function scope but if you want to use these swaping values out side the function then you have to pass these variable by refernce
@ahsanfraz9105
@ahsanfraz9105 3 жыл бұрын
And secondly I appreciate your service and accept that once I saw your video definitly learn new stuff and always seek to learn new things.
@Siva-lx9dw
@Siva-lx9dw 3 жыл бұрын
Hii bro... I have some doubts in reactjs bro..Can you give your id or any community is there.. Pls tell me bro
@Techsithtube
@Techsithtube 3 жыл бұрын
You can email me . You can join my facebook community for react. Its on my channel page.
@Siva-lx9dw
@Siva-lx9dw 3 жыл бұрын
@@Techsithtube I already given a join request bro.. Please accept it bro
@shwethahv1684
@shwethahv1684 3 жыл бұрын
const length = 4; const numbers = []; for (var i = 0; i
@CodingNuggets
@CodingNuggets 3 жыл бұрын
Great video. Always love these tips and tricks videos. It's interesting getting someone else's perspective and how they deal with code. Thanks my friend. See you soon!
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad you enjoyed it! Thanks for watching!
@kedarkulkarni0074
@kedarkulkarni0074 3 жыл бұрын
Hey techsith, can you make a video on how to have patience while watching the long video? I really want to watch the entire video , but I somehow don't have that much patience
@mrigankabora4835
@mrigankabora4835 3 жыл бұрын
start with 10 min, do 15 min next day , then 20 min .. day by day increase ..you will be more patient.
@Techsithtube
@Techsithtube 3 жыл бұрын
Good advice!
@sumeetsood232
@sumeetsood232 3 жыл бұрын
was not able to fully understand how 1st trick works- a = (b+= a -=b) - a; can you explain it how -=b works?
@josephwong8105
@josephwong8105 3 жыл бұрын
I also need this explanation.
@Techsithtube
@Techsithtube 3 жыл бұрын
let say a = 1, b = 2 , a = a + b ( a=3, b=2) , b = a - b ( a=3, b=1), a = a-b ( a = 2, b=1)
@sumeetsood232
@sumeetsood232 3 жыл бұрын
I know how swapping of 2 variables without using 3rd variable works but not able to understand the syntax you used i.e where are we calculating a= a+b in Expression you used
@josephwong8105
@josephwong8105 3 жыл бұрын
@@sumeetsood232 for instance?
@babakbekhradmanesh871
@babakbekhradmanesh871 3 жыл бұрын
@@sumeetsood232 Hi Sumit, for understanding this concept, You have to know about Operator precedence in JavaScript. In this case, the first precedence is Grouping. I mean 'parentheses'. like this (b+= a -=b). Bear in mind that the Associativity is right to left. So as you can see, we need to calculate the right side of parentheses that it is a-=b and it is equivalent to a=a-b. after calculating, we have a=-1 until know (a=1-2). as well as, we need to calculate the left part of parentheses Ok? It is b+=a. so as I told you before it is equivalent to b=b+a. after calculating, we have b=1 like this (2+(-1)). So far our variables are a =-1, b=1. In the next step, we need to calculate the rest of the logic of the code which is a=(b)-a. so as you know we have b Ok? we only need to put it so a =2. like this a=1-(-1). that's it :-). a=2 and b=1. I hope that makes sense to you.
@namratagiri4240
@namratagiri4240 3 жыл бұрын
Nice video, thanks. Can you please share video on integrating payment gateway to website( html, css, js website) please 🙏
@Admiral_Ducky
@Admiral_Ducky 3 жыл бұрын
KZbin ads were not annoying enough, now every youtube channel has its own in video ad. I feel strong contempt for this and I think it's super disrespectful to waste viewer's time by showing long ads at first of every freaking video. I personally avoid those product which are depicted in this sort of ads like a plague.
@Techsithtube
@Techsithtube 3 жыл бұрын
Ramin, I agree with annoying adds. Let me tell you little bit of history about what is happening so you would understand. KZbin has reduced income by 50% last year. As a content creator, I spend significant amount of time in producing these videos. 10 min video takes me about 7hrs to produce from concept to final upload. If I want to continue making these video for free, I had to look for some other income source. Hopefully that answer your question.
@Admiral_Ducky
@Admiral_Ducky 3 жыл бұрын
@@Techsithtube Alright, alright, so maybe it's time to move on! Maybe this way of doing business is dead. Making video and publishing them on youtube is not working! Begginers don't learn like this. They need an interactive environment and community to learn for real. KZbin was a cash grab for too many years. Most of programming channels are misleading and worthless. Students need to know how they could put their knowledge into practice. These videos lead them to nothing. It's time to do something really different for teaching people if you really care.
Tagged Template Literals JavaScript
10:48
techsith
Рет қаралды 10 М.
ES2021
20:18
techsith
Рет қаралды 13 М.
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Tricky CSS Interview Questions and Answers
13:09
techsith
Рет қаралды 43 М.
Tricky JavaScript interview questions and answers
21:01
techsith
Рет қаралды 133 М.
Top 10 JavaScript Interview Questions ( Part 2 )
13:05
techsith
Рет қаралды 291 М.
5 Must Know JavaScript Features That Almost Nobody Knows
18:06
Web Dev Simplified
Рет қаралды 478 М.
Top Tricky JavaScript Interview Questions and Answers
15:42
techsith
Рет қаралды 83 М.
React data fetch with suspense  | concurrency mode
19:43
techsith
Рет қаралды 17 М.
react 17 upgrade
13:36
techsith
Рет қаралды 10 М.
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН