JavaScript Cardio [Session 2] - LongestWord, Anagrams, Array Chunking

  Рет қаралды 55,691

Traversy Media

Traversy Media

Күн бұрын

Пікірлер: 122
@TraversyMedia
@TraversyMedia 6 жыл бұрын
The next session will be a beginner session with more challenges but easier. We will eventually have a really advanced session as well. Hope you enjoy. Let's see those likes!!
@shubhamkumarsingh8224
@shubhamkumarsingh8224 6 жыл бұрын
hey bro just go into google and write " udemy course on traversy media " then u get a link of mr. Brad course .............. i hope this will help u ... thank u .......................
@peterborinski
@peterborinski 6 жыл бұрын
Can't wait for the super advanced session! Love these, thank you for this!
@logicstv
@logicstv 6 жыл бұрын
Traversy Media you should think aloud just that we can have an idea of how you see the problem and approach
@陈瀚龙
@陈瀚龙 6 жыл бұрын
Can't wait for the advanced stuff. I'd love to see alternative JS solutions to some of the Leetcode challenges I've been facing. Even the simple ones like two sum. I've learned a lot from these last 2 tutorials. Thank you so much.
@alexdeclercq9881
@alexdeclercq9881 5 жыл бұрын
Yes please! We need a cardio session 4 with advanced challenges! I got ur courses from Udemy
@BobbyBundlez
@BobbyBundlez 4 жыл бұрын
wow. so much depth to the anogram and letter changes algos. learning sooo much and found these at the perfect time to step my JS game up from noob to intermediate. been coding a year and feel ready to get my hands a little dirtier! haha. learning React can often make me neglect this kind of stuff :(
@jasonmcgloin8397
@jasonmcgloin8397 6 жыл бұрын
Brad, your videos are awesome. You do them right: you explain in a way that doesn’t sound scripted, you leave in your mistakes, you reason through the problems. So much better than the “Here, type this” style videos. Thanks very much!
@thisaintmyrealname1
@thisaintmyrealname1 6 жыл бұрын
You help millions daily. I've shown my support purchasing your excellent Udemy courses. Thank you so much Brad, I just had an interview and it seems like I'm going to land a job as a React developer and it's all thanks to you. Greetings from Ecuador.
@skootdiggity1301
@skootdiggity1301 6 жыл бұрын
TYVM Brad! I've been programming professionally for 20 years, but I still find these sorts of lessons highly valuable for when you find yourself back on the job market and needing to answer questions you haven't thought about in a long time. I'm also primarily a Java developer, so it's really helpful to see how to accomplish tasks that I'm comfortable with in Java, but don't know the JavaScript equivalent for.
@ashutoshnayak609
@ashutoshnayak609 6 жыл бұрын
Brad, I really owe you a lot for all the effort you take to make these videos. I am 12 year old from India and employement opportunities to teenagers out here is quite scarce so I can't afford paid courses. Official documentation, blogs and youtube videos of yours are all the resources I have. Once again thanks for the videos:)
@ayushekka3926
@ayushekka3926 6 жыл бұрын
Ashutosh , hi can you code
@ashutoshnayak609
@ashutoshnayak609 6 жыл бұрын
ayush ekka for sure , I am comfortable with html,css,angular, react node and express with python and c++. I am learning angular 5 now though
@lightspeedlion
@lightspeedlion 6 жыл бұрын
Hi, Ashutosh Nayak, are you 12 years old? That's stunning, when I was your age I ate mud. But coding for a 12 year old is lot of stress. Invest your time on pure sciences like physics and chemistry may be some thermodynamics and fluid-mechanics or if your a chem guy may be some molecular-biology. Contribute to the pure science community. Coding is never static and you have to upgrade frequently, 20 years from now I'm sure you will still end up learning. The thing is, coding is not stress-full, but the curiosity and zeal to learn once you understand coding drives you crazy and leaves you sleepless. This is the age where your body develops. Mental stress can actually have an adverse effect on you in the long-run. If you like coding however. Do coding less and try inventing some cool algorithms, do looping in different ways. After all its your personnel interest.Try ripping off your remote-control car motar and see whats in it, its worthwhile.
@ashutoshnayak609
@ashutoshnayak609 6 жыл бұрын
lightspeedlion yeah , I am 12+ and I am going to be hitting 13 this May. Well,coding for me is more of a hobby then a career and I code during my free time . I understand that coding is more dynamic and subject to frequent changes than any other field but that's what keeps me interested in this line. Thanks for the suggestions BTW
@lightspeedlion
@lightspeedlion 6 жыл бұрын
Nice its totally fine as long as its a hobby. You must be studios to be coding. Keep the hobby good for you in the future.
@davehoffman9622
@davehoffman9622 6 жыл бұрын
Keep up the good work Brad. I love the idea of your javascript cardio. I'm still in the process of learning javascript so this is nice to keep my learning sharp!
@FuzzyAnkles
@FuzzyAnkles 3 жыл бұрын
2:10 LongestWord 10:10 ChunkArray 20:43 FlattenArray 27:56 Anagram 35:03 Letter Change
@michelribbens8014
@michelribbens8014 6 жыл бұрын
Brad for real you are the best KZbin teacher ever. thanks for all your amazing videos and uploads. I've been learning to write code only since a few months and your videos have helped me a lot. although at this moment I am not far enough to understand all this JavaScript code from this video, I am sure it will be very helpful in the future. just wanted to give a big up after sawing you upload another video glad I could do something in return and bought a few of your courses on Udemy. soon I will start your JavaScript and Bootstrap 4 lessons. you definitely deserve my money as a bit of compensation for all these amazing free content here on KZbin. keep up the good work!
@arunkaiser
@arunkaiser 6 жыл бұрын
Awesome 😍 we need session 3, 4, 5, 6 and more o this JS i am waiting 😍💐
@Supratick1787
@Supratick1787 5 жыл бұрын
An extremely good session Brad. All your sessions are very helpful. One thing I want to add though - flattening arrays I love to do like this - arr.join().split(",")....even with many levels of arrays inside array, it works like a charm :)
@TrentHarlem
@TrentHarlem 3 жыл бұрын
works well for arrays with 'string' type items, but not for integers, as .join() returns a string
@aprilmintacpineda2713
@aprilmintacpineda2713 6 жыл бұрын
You are doing a pretty good job, man. and don't worry if the video is getting long, it doesn't matter as long as the contents are very useful and/or helpful.
@buiductai489
@buiductai489 6 жыл бұрын
2 videos about JavaScript Cardio are very useful. I hope you can upload more videos of the same topics like this.
@aadil4236
@aadil4236 3 жыл бұрын
We need more JavaScript cardio.
@ErnestGWilsonII
@ErnestGWilsonII 6 жыл бұрын
Excellent video as always! I am hoping you put out a single video each week with maybe a single challenge so that a new episode in this series continues. Thank you for making these and sharing with us! I am of course subscribed and thumbs up and a patron.
@Mohamedtarek-qz2zj
@Mohamedtarek-qz2zj 5 жыл бұрын
brad you are awesoome always covering everything
@MrRicharddaniel
@MrRicharddaniel 6 жыл бұрын
Hello Brad. Thanks for the awesome javascript videos on the channel. Any chance if you could add some dev ops into the mix? Lets say for people who want to learn a bit more advanced stuff as well such as docker and kubernetes. I have been following along with your channel from quite some time many others have too. We are ready to take the next big leap into our journey of programming. Thanks
@RichardCodes
@RichardCodes 6 жыл бұрын
Keep up the good work man, You inspired me to start my own channel!
@christopherkramer6174
@christopherkramer6174 6 жыл бұрын
Your content always helps and is of the highest quality. Thanks for the upload.
@NGarcia
@NGarcia 6 жыл бұрын
This Cardio Session is the BEST time for Knowledge you can get! Thank you!! Great to remind and learn new stuff at this speed =)
@KochharAmandeep
@KochharAmandeep 6 жыл бұрын
We appreciate these kind of videos! You are helping me a lot in js
@samshanmukh
@samshanmukh 6 жыл бұрын
Thanks a lot for the second session. Can't wait for the advanced one. you're my role model.
@KejGiunit
@KejGiunit 6 жыл бұрын
Hey Brad, thank you for another great session. Just to give a little info, there is great extension for VS Code called "Code Runner". It allows You to run JS, PHP and many other scripting languages inside integrated terminal. Thats all from me keep up the good work.
@danieladetayo3711
@danieladetayo3711 6 жыл бұрын
Amazing video Brad. This is the aspect of programming that makes one feel stupid. I hope to fully understand the language one day.
@didarsubasi
@didarsubasi 3 жыл бұрын
Brad you are very helpful thank you and do you have a course on debugging i searched your channel but couldnt find maybe under a different name?
@chnoor1994
@chnoor1994 4 жыл бұрын
Great work Brad!!
@novailoveyou
@novailoveyou 4 жыл бұрын
Thanks Brad!
@SogMosee
@SogMosee 6 жыл бұрын
javascript is a really cool language. I don't know why people hate on it so much.
@pikachu5223
@pikachu5223 6 жыл бұрын
because they don't understand it
@dansintean6820
@dansintean6820 6 жыл бұрын
Same thing applies to weed
@BobbyBundlez
@BobbyBundlez 4 жыл бұрын
the longest work one i do far differently. i actually like how you do it but it is a bit more of an advanced approach than mine. for more beginner coders this solution might help! const longestWord='hello there myyyyyyyyy friend" const longest=(string)=>{ let tempMax=''; const words=string.split(' '); for(let word of words){ if(word.length>tempMax.length){ tempMax=word } } return tempMax } ***should return 'myyyyyyyy'
@karthikjoshi6386
@karthikjoshi6386 3 жыл бұрын
Longest word function longest_word(sentence){ let result=sentence.split(' ').sort((a,b)=>{ if(a.length
@UrbanBDKNY
@UrbanBDKNY 5 жыл бұрын
This series is excellent for these types of playful interview quick hit exercises The chunked array one though was a 🤷🏽‍♂️ for me. First one in the series where I didn’t understand
@swanstudios2018
@swanstudios2018 6 жыл бұрын
Your on fire Thank you Brad! I'm trying to catch up and keep up!
@ASoftwareEngineer
@ASoftwareEngineer 6 жыл бұрын
great cardio. thanks Brad.
@biplabpaul537
@biplabpaul537 5 жыл бұрын
Thanks alot sir. Sir, we want more this kind of sessions...
@ianchin5634
@ianchin5634 6 жыл бұрын
Thank you so much for this series
@nidhirenil1899
@nidhirenil1899 5 жыл бұрын
fast and clean
@gaborszekely8387
@gaborszekely8387 5 жыл бұрын
Nice vid, but gotta watch that Big O time complexity, Brad! :)
@rajbannasa7662
@rajbannasa7662 3 жыл бұрын
Thank you so much sir ❤️
@ghezalmohammedamine7057
@ghezalmohammedamine7057 6 жыл бұрын
Hi brad, your lessons are excellent can you make us a series on the VOYAGER laravel package?
@bodasandeepkumar4234
@bodasandeepkumar4234 6 жыл бұрын
Brad ! you are awesome ...
@archiewells3955
@archiewells3955 6 жыл бұрын
First, thanks for the second batch of Code Cardio! I've been mixing up stuff, such as adding your toLowercase() and matching(), which was new to me. My approach had split the string with split(). and I was having trouble. Seems that match() effectively parses out the string into substrings?? Also, discovered that regex is case sensitive, A-Z is not the same as a-z! Made a very modest contribution thru Paypal as I am very appreciative of this type of post.
@colebear6258
@colebear6258 6 жыл бұрын
Check out .flat() for Challenge 3 ;)
@BobbyBundlez
@BobbyBundlez 4 жыл бұрын
would you say if i know all of these without even watching the video as well as section 1 of traversy array cardio i am job ready? ive been coding over a year now.... really hard to find work !
@stuknowlton477
@stuknowlton477 4 жыл бұрын
Please more JS Cardio Sessions!
@AbhishekKumar-mq1tt
@AbhishekKumar-mq1tt 6 жыл бұрын
Thank u for this awesome video, I am waiting for advance one
@Saniekasmara
@Saniekasmara 4 жыл бұрын
Im so confused how when brad push [val] the whole chunk array was the one that got pushed and not the iteration value that got pushed?
@Sam-cz7ck
@Sam-cz7ck 3 жыл бұрын
thanks a lot!
@karthikjoshi6386
@karthikjoshi6386 3 жыл бұрын
Flatten an array function flateanarray(array){ let newarray=[] array.forEach((element)=>{ newarray.push(...element) }) return newarray } console.log(flateanarray([[1,2,3],[4,5],[6,7]]))
@LiaSueKim
@LiaSueKim 6 жыл бұрын
Hello can you make a video about file system or directory for projects ?
@sierranexi
@sierranexi 5 жыл бұрын
What's that syntax theme?
@avi12
@avi12 6 жыл бұрын
6:24 I actually have a better, more performant solution: function longestWord(sen) { const wordArr = sen.toLowerCase().match(/[a-z\d]+/g); const sorted = wordArr.sort((a, b) => b.length - a.length); const longestWord = sorted[0].length; const longestWords = []; for (const word of sorted) { if (word.length < longestWord) { break; } longestWords.push(word); } if (longestWords.length === 1) { return longestWords[0]; } return longestWords; } In my solution, I replaced the filter() with a "for of" loop and simply iterated until finding a word whose its length is less than the length of the longest word This is more performant because filter() iterates over the entire array, while I break out of the for loop as soon as I find a word with an inappropriate length
@TraversyMedia
@TraversyMedia 6 жыл бұрын
Make a pull request. I'm sure there are many solutions. I'm no master, my job is to get the gears going and get you guys thinking as you are :)
@markadell
@markadell 6 жыл бұрын
Hey, it would be really helpful if you did a tutorial on deploying Node.js Application on AWS Elastic Beanstalk.
@matthewtetley7048
@matthewtetley7048 6 жыл бұрын
Could you possibly do a video about managing a web server, so that newbies have an understanding of how to control how many views a website can take early in and how to expand it if the views increase daily by hundreds or thousands.
@devopssimon
@devopssimon 6 жыл бұрын
Hi, coming from the world of PHP, when I needed to set a variable, say the max date that exists in the database, I might right a function and call it with $maxDate = getMaxDate();. In NodeJS this can't be relied upon because it might take a second for the function to return the value and my maxDate variable might be empty when it's needed due to the Asynchronous nature of NodeJS. So I end up making my function return a promise and wrapping the rest of my code in it. This however is a horrible way just to set a variable. If I have 20 variables that need to be set, it get's unworkable. Can you do a video explaining a better approach. Thank you.
@chnoor1994
@chnoor1994 4 жыл бұрын
thank you sir! please make a video about how to debug :)
@yamacode9958
@yamacode9958 5 жыл бұрын
The github files are different, did you change the comments.
@mikeysplayhouse1971
@mikeysplayhouse1971 3 жыл бұрын
I broke the longest word code by giving it the elvish phrase "Êl síla erin lû e-govaned vîn." I fixed it by adding the following to the regular expression [a-zA-Z0-9_.-]
@nikhiltyagi1080
@nikhiltyagi1080 6 жыл бұрын
VIDEO REQUEST! Responsive image gallery with lightbox effect that has dark overlay, image title and description with each image and prev next buttons. Coded with vanilla js without any jquery libraries or plugins. Pls!
@claudiolcastro
@claudiolcastro 5 жыл бұрын
Hey Brad! May i write an article in portuguese using yours exemples from sessions 1 to 3? (giving you the credits, off course =D). Its an opportunity to brazilians students/devs that dont have fluency in english. thanks!
@michaelrooze278
@michaelrooze278 2 жыл бұрын
In the chunked one, I don't see how we are pushing anything to "last" when last is not an array
@whatthehuman_e
@whatthehuman_e 5 жыл бұрын
24:32
@tryagain622
@tryagain622 6 жыл бұрын
Brad, Can you please continue this session
@rajatomar7508
@rajatomar7508 6 жыл бұрын
Hey brad could you make a similar cardio session for python.. Btw loved this video anyways✌
@samrey8134
@samrey8134 4 жыл бұрын
My only issue with this video is I can only like it onces....... It so good it hurts..... THANK YOU
@vezeveer
@vezeveer 5 жыл бұрын
where is session 3, Brad
@陈瀚龙
@陈瀚龙 6 жыл бұрын
Who can recommend one of the better Java equivalents to this series?
@beneven-kesef5121
@beneven-kesef5121 5 жыл бұрын
The 'Crack the Coding Interview" book is essentially this but with Java Syntax. If you just type this into youtube though Im sure there are more guides out there as well.
@olegmarchenko9358
@olegmarchenko9358 6 жыл бұрын
waiting for the next video JScardio;
@shamir-imtiaz
@shamir-imtiaz 6 жыл бұрын
Sir, please upload how to use firebase in laravel project
@oakleyorbit
@oakleyorbit 6 жыл бұрын
I don't know if anyone else had this issue but on the "Flatten Array" a.concat kept giving me, not a function any help would be appreciated.
@oakleyorbit
@oakleyorbit 6 жыл бұрын
Nevermind!
@colebear6258
@colebear6258 6 жыл бұрын
Check out .flat() on MDN.
@dejo095
@dejo095 5 жыл бұрын
you probably had the same mistake as I did, passing arguments as ( [], [], [] ) instead of as array of arrays ( [ [], [], [] ] )
@dejo095
@dejo095 5 жыл бұрын
@@colebear6258 this is the best method definitely!
@alexwhite8720
@alexwhite8720 6 жыл бұрын
Mr Brad if i die without seeing you, i would be super hurt. We need to do something, you and i
@praveenreddyadelli8094
@praveenreddyadelli8094 6 жыл бұрын
I really wish you make a tutorial on underscoreJS.
@dansintean6820
@dansintean6820 6 жыл бұрын
You mean lowdash?
@praveenreddyadelli8094
@praveenreddyadelli8094 6 жыл бұрын
Dan Sintean Ya, they’re almost similar
@AndryRoby
@AndryRoby 6 жыл бұрын
Hello, could you please do tutorial on ect. Hotel Website. Please
@AndryRoby
@AndryRoby 6 жыл бұрын
BTW Helpful tut
@evilmorty-tv1xs
@evilmorty-tv1xs 6 жыл бұрын
Hey Brad ,I know this is irrelevant to the current video ,but can you please do a tutorial on structuring and deploying a flask app to the web ???There are so many ways of structuring the app that it is quite difficult for noobs like me to understand !
@ashutoshnayak609
@ashutoshnayak609 6 жыл бұрын
varshith 2000 well Brad actually has a series on Flask on KZbin.you can check it on the channel
@evilmorty-tv1xs
@evilmorty-tv1xs 6 жыл бұрын
Ashutosh Nayak yeah,I learned flask from his channel. It is a simple app with a single file. I have a made some bigger apps since then and I have been struggling to deploying it to web(like heroku). The problem was always with the file structure of the app. That's the reason I asked for a tutorial
@anemophilistmonk
@anemophilistmonk 6 жыл бұрын
Come up with angular 5
@Spikespiegs
@Spikespiegs 4 жыл бұрын
Working my way through this video gave me an intense bout of imposter syndrome...difficult stuff. 😔
@petermichael5447
@petermichael5447 6 жыл бұрын
YOU ARE FUCKING BEAST BRAD! thanks to this. i hope you can teach sometimes HTML EMAIL DESIGN if you have a time thanks brad!
@paulgirard3093
@paulgirard3093 6 жыл бұрын
Cool
@n_fan329
@n_fan329 5 жыл бұрын
1:19 😂😂😂😂😂👍👍👍
@n_fan329
@n_fan329 6 жыл бұрын
1:19😂😂😂😂😂👍👍👍
@iamsajjadalidev
@iamsajjadalidev 3 жыл бұрын
Sir you mostly used the .toLowercase() method but I didn't get the reason for it please can you explain it?
@infinityApologeticsClips
@infinityApologeticsClips 3 жыл бұрын
I don't like regular expressions :/
@nathancornwell1455
@nathancornwell1455 4 жыл бұрын
I love when people ask for a video on regexp. Not realizing that you could make an entire course on only RegExp... Honestly, If i need to validate email or something like that with a regexp , i just get it off stackoverflow because they are insanely complicated. If you don't believe me, check out this SO on it : stackoverflow.com/questions/201323/how-to-validate-an-email-address-using-a-regular-expression
@DennisAlvey
@DennisAlvey 6 жыл бұрын
Brad, I misplaced your email. Please give again?
@varuntp2402
@varuntp2402 6 жыл бұрын
support@traversymedia.com
@موسيقىكلاسيكية-ن6ج
@موسيقىكلاسيكية-ن6ج 6 жыл бұрын
I want School Programming online learning
JavaScript Cardio [Session 3] - Add All, Sum Primes, Seek & Destroy
40:24
JavaScript Cardio [Session 1] - Reversals, FizzBuzz, MaxChar
44:35
Traversy Media
Рет қаралды 171 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
JSON Crash Course
24:49
Traversy Media
Рет қаралды 1 МЛН
The Importance of Specialization in Coding
7:13
Traversy Media
Рет қаралды 241 М.
Feeling Stagnant As A Developer
7:43
Traversy Media
Рет қаралды 33 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
JavaScript Higher Order Functions & Arrays
34:56
Traversy Media
Рет қаралды 989 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
The New Outlook is TERRIBLE
20:19
Chris Titus Tech
Рет қаралды 110 М.
JavaScript OOP Crash Course (ES5 & ES6)
40:21
Traversy Media
Рет қаралды 593 М.
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН