Codewars JavaScript Tutorial: How to approach solving basic kata

  Рет қаралды 45,481

Code With Bubb

Code With Bubb

Күн бұрын

Пікірлер: 34
@codewithbubb
@codewithbubb 5 жыл бұрын
Don't forget to check out the rest of the beginner exercises series here: kzbin.info/www/bejne/hGeYg6mEoL95fac
@cndler23
@cndler23 4 жыл бұрын
2020: the year where programmers became better due to the coronavirus.
@codewithbubb
@codewithbubb 4 жыл бұрын
Hopefully!
@sogggy
@sogggy 4 жыл бұрын
How about more codewars tutorials like this?
@codewithbubb
@codewithbubb 4 жыл бұрын
Thanks for the suggestion. Yep, I might just do that 😀
@codewithbubb
@codewithbubb 4 жыл бұрын
I did a live stream the other day which you might find useful: kzbin.info/www/bejne/habQXpRvfaZkppY
@Martin-jq8th
@Martin-jq8th 4 жыл бұрын
this is not a video on HOW to approach the challanges. this is video of the OP solving 3 riddles. not useful and misleading title.
@shushantsingh1976
@shushantsingh1976 5 жыл бұрын
I didn't found the link for the problems in the description.
@codewithbubb
@codewithbubb 5 жыл бұрын
Oh geez, I must have forgot to put them in the description when I did this! I'll have a look through my Codewars account and see if I can find them for you :)
@shushantsingh1976
@shushantsingh1976 5 жыл бұрын
@@codewithbubb Thank-you
@napoleonbonaparte5972
@napoleonbonaparte5972 4 жыл бұрын
Hello James, I am new to programming and am attempting to learn python by myself. Is it okay to learn just the generals of 2 or 3 of them (I was actually thinking of learning c++ and java too) in the same fashion as the first? Or learn only one, but learn it in really a great depth?
@codewithbubb
@codewithbubb 4 жыл бұрын
Hi Ishraaq, thanks for your question. I think it's good to get to know the basics of programming before diving deep in to a specific language. So your suggestion of learning Python (which is a good language to learn programming from) is a good one. Once you're up to speed with programming basics, you can then start to look at learning other languages and learn more of the in-depth aspects as you go further down your journey.
@napoleonbonaparte5972
@napoleonbonaparte5972 4 жыл бұрын
@@codewithbubb Thanks brother! I was having this dilemma for a few weeks now, and am really glad to have it resolved. Also, since I am just learning how to code, do you think C++ is better than Python? Because a few other experienced programmers really emphasise on learning C++ first, as it gives a person an in-depth knowledge about programming in general.
@rique5434
@rique5434 2 жыл бұрын
why did "+ 1" make it pass the test for the second kata you did?
@taylorwade1537
@taylorwade1537 2 жыл бұрын
I don't understand this either, he said that adding a +1 will include the column you are in, but in the instructions I thought it said that the number of the column you are given is the one you are sitting in, so wouldn't that be inclusive? maybe I'm missing some basic math here....
@amanahmed6057
@amanahmed6057 Жыл бұрын
can you make playlist on a katas python language
@eljoven732
@eljoven732 3 жыл бұрын
the problem i am having is that i can't find resources that could lead me to solving the problems
@comicstwisted
@comicstwisted 5 жыл бұрын
really cool stuff!
@codewithbubb
@codewithbubb 5 жыл бұрын
Thanks Patrick! Appreciate the feedback. What type of tutorials would you like to see in the future?
@MrChilo89
@MrChilo89 3 жыл бұрын
they should shut this kind of websites
@michaeldevlin6147
@michaeldevlin6147 4 жыл бұрын
Hi there. Thanks for this, I found it incredibly useful - I've just subscribed :) Just a quick question about the last challenge. I tried to reword your solution using an if statement but it doesn't seem to work. I'd really appreciate if you could explain what I may have missed or what I may need to do differently: function points(games) { return games.reduce((pointTotal, match) => { const [x,y] = match.split(':'); var points = 0; if (x>y) {points += 3} else if (x==y) {points += 1} else {points += 0} pointTotal += points; return pointTotal; }); } Sorry for being a pain and for posting code in a youtube comment, where it looks infinitely more ugly and out of place! I'd really appreciate any advice you could offer. Thanks!
@codewithbubb
@codewithbubb 4 жыл бұрын
Hi Michael, No problems, yeah KZbin isn't great for code formatting (you can always post a link to a Gist or a Codepen.io). So looking at the output of your function, it looks like the result is being concatenated together as a string as the pointTotal value is not initialised in the reduce function (weird behaviour I know). The solution is to intialise the accumulator (pointValue) to 0. function points(games) { return games.reduce((pointTotal, match) => { const [x,y] = match.split(':'); var points = 0; if (x>y) {points += 3} else if (x==y) {points += 1} else {points += 0} pointTotal += points; return pointTotal; }, 0); } Hey presto, you should get the right output for the exercise now. Hope that helps.
@michaeldevlin6147
@michaeldevlin6147 4 жыл бұрын
@@codewithbubb Wow, thanks. Yes, I saw you mentioned about initialising the acc to 0 in your tutorial, but I (naively) assumed it wouldn't be necessary if I converted it to an if statement. Thanks for clairfying and for taking the time to offer a response!
@codewithbubb
@codewithbubb 4 жыл бұрын
No problems, glad it's working for you now 😊
@AtomicBl453
@AtomicBl453 2 жыл бұрын
why did they skip the I column?
@torbjorkette
@torbjorkette 4 жыл бұрын
3.38 task. Is that a joke/trick question. It sounds bizarre: why would I climb over a seat, when I could walk down the row. If I have to climb over my seat, to yet another row filled with people to only have to still climb over one of their seats too.....walking down one row makes most sense. Nobody climbs over seats in a theatre. If I had to answer this irl whiteboardtest, I´d fail bc my reply: I wouldn´t climb over a row in a THEATRE. & given the question, why does it matter the total number of rows/columns in the entire theatre: only yours & the one behind matter. I would totally fail questions like this. They don´t make sense. In context, even one person disturbed in the theatre means you stay til it´s over.
@AbdullahRehmanbsfo-Eve
@AbdullahRehmanbsfo-Eve 2 жыл бұрын
For football points i wrote this code: obv your code was concise and awesome but as a beginner I wrote this: const fun=(matches)=>{ let p1=[]; let p2=[]; let points=[]; for(i=0;ip1[i]) points[i]=3; else if(p[i]a+v,0) } console.log(fun(['3:3','1:3','5:3','4:4','4:5','4:4','4:3','1:3','0:3','4:0']));
@alexanderskladovski
@alexanderskladovski 2 жыл бұрын
How to approach solving advanced kata?
@QayumSunny
@QayumSunny Жыл бұрын
I Learn To Codewars Of Javascript 👨‍💻👨‍💻
@manuict4916
@manuict4916 Жыл бұрын
I would like to do some exercise about class oop
@pjguitar15
@pjguitar15 3 жыл бұрын
Code Wars Tutorials are too difficult >.< (atleast for my level)
@codewithbubb
@codewithbubb 3 жыл бұрын
Yes, they're definitely challenging to start off with. If you stick with them and practice, looking at other people's solutions you'll soon get better.
@christio9067
@christio9067 3 жыл бұрын
@@codewithbubb exactly how I feel code wars feels crazy difficult is there another way to train if I am not up to that level?
@antoniogross2266
@antoniogross2266 2 жыл бұрын
i had to google kata..omg why cant these people use simple terms like code exercise. stop trying to sound smart ur dealing with newbies in coding
JavaScript Array Method Exercises 01
9:10
Code With Bubb
Рет қаралды 24 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
JavaScript Codewars: Solving Basic Katas Live! 04/03/2020
20:19
Code With Bubb
Рет қаралды 3,4 М.
Let's Code Codewars - Codewars Challenges #1
45:15
NeuralNine
Рет қаралды 83 М.
How to Solve Coding Problems (the best way to learn)
12:29
Aaron Jack
Рет қаралды 240 М.
How to MASTER Javascript FAST in 2023
12:49
Internet Made Coder
Рет қаралды 379 М.
How To Become a Better Programmer with Code Wars [ Don't wait to do this ]
8:13
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 820 М.
How I Would Learn Javascript FAST in 2023 (from zero)
8:09
Internet Made Coder
Рет қаралды 342 М.
Easy JavaScript Exercises with Edabit
15:25
Code With Bubb
Рет қаралды 6 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Learn to Code Faster Using Codewars!
30:30
Trash Puppy
Рет қаралды 4,6 М.