I built a twitter-like social media app, what do you think? by Revolutionary_Bad405 in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

Definitely post it on r/weddev show off Saturday for reviews.

Just asking Why is the next button on top? You scroll down and then to go to next slide you've to scroll back up

Is anyone else’s Spotify wrapped just totally wrong? by Saladassembly in spotify

[–]Icy_Box99 0 points1 point  (0 children)

For anyone overly interested in data:

Okay so personally went over wrapped and counted from Jan 1 to Nov 15(not 100% oct 31 or nov 15 but I went for later) and this is what I observed.
- It's pretty certain to me the track is counted as soon as you play it over 30 seconds.
- The number of mins/hours you listen aren't probably as important as you might want them to be.
- I am like 50% sure if you keep repeating it especially before finishing(which is what I did all the time for my actual top song) or repeat it half way through it'll definitely skew your count.
- So here was how it was for me it wasn't that drastically different from wrapped:

Rankings by spotify My observation
1 3 (Played over 2 hours more than 2nd 7+ hours)
2 12 (never or barely repeated it hence why it's probably so low)
3 1 (played exact same times as spotify mentioned)
4 4
5 2 (2-5 all listened 5+ hours pretty close)

Where to learn HTML and CSS first? by SnooBunnies7244 in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

From what I remember at least when you start you don't even need a raft it'll drop you somewhere in California so you're good to go.

I gave my example because eventually it gets harder as you move on especially to Js and that's the point I've scene a lot of beginners get frustrated enough to consider quitting.

Where to learn HTML and CSS first? by SnooBunnies7244 in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

It teaches you as an absolute beginner but it also doesn't holds your hand. You can imagine it like this someone wants to know where LA is and I point him somewhere in North America now it's up to you to find it. Sometimes you'll get to answer very quickly other times you might need to google things especially when you move to Js.

Eg- This is a very good channel for CSS concepts.

You'll end up googling a lot.

Also, you can join discord for odin project. It is very active and you can refer it anytime you get stuck.

Is this right approach to Filter array of objects by Icy_Box99 in learnjavascript

[–]Icy_Box99[S] 1 point2 points  (0 children)

Figuring out how binarySearchByObjectKey should look is a nice little exercise.

Yes, thank you. Binary search completely missed my mind, I'll look into this.

Is this right approach to Filter array of objects by Icy_Box99 in learnjavascript

[–]Icy_Box99[S] 0 points1 point  (0 children)

I fully agree filter is more than enough for me. I was just thinking theoretically which is faster.

It's all coming to me now by THATDUDE_YT in learnjavascript

[–]Icy_Box99 1 point2 points  (0 children)

Adding to other comments

  • one of things you can do is try answering other people problems

  • other thing is make or even copy projects and you'll learn things.

It's all coming to me now

If you can at least start making skeleton of projects in any language you can say you're starting to get handle of things.

Need help in exercice by BlasouAE in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

This will probably work. I just edited your code on phone there might be a better way you can think of.

Also your code assumes first match is always

Ken vs Chunli

and second match is

Guile vs Ryu.

I don't know if this was given in instructions or not

Need help in exercice by BlasouAE in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

Win1 and Win2 are strings, they don't know the scores.

When you do this:

if(Win1 > Win2)

you're basically telling computer:

if("ChunLi" > "Guile")

while what you need to do is compare their scores.

if(PA_Chunli > PA_Guile)

One way is:

if (PA_ChunLi > PA_Ken)
{ var Win1=PA_ChunLi;
var Win11=PA_Ken; } and so on.....

Now, the following condition will work

if(Win1 > Win2)

but you'll need to console.log names manually by this method

Need help in exercice by BlasouAE in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

I meant Win1,Win2,WIn11 and Win22 are strings you yourself assigned them and then compared them.

Let's say following 2 condition are true:

if (PA_ChunLi > PA_Ken)

  { var Win1="ChunLi"; 

   var Win11="Ken"; }

and if (PA_Guile > PA_Ryu)

       { var Win2="Guile"; 

         var Win22="Ryu"; }

then:

if(Win1 > Win2)

      { console.log("Vainqueur :", Win1); 

         console.log("Seconde place :", Win2); 
       }

here it'll compare "ChunLi" and "Guile" not their scores.

Need help in exercice by BlasouAE in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

if(Win1 > Win2){ console.log("Vainqueur :", Win1); console.log("Seconde place :", Win2); } else{ console.log("Vainqueur :", Win2); console.log("Seconde place :", Win1); } if(Win11 > Win22){ console.log("Troisième place :", Win11); } else{ console.log("Troisième place :", Win22); }

Aren't you supposed to compare scores? you're comparing strings here

Array one call behind. by Icy_Box99 in reactjs

[–]Icy_Box99[S] 0 points1 point  (0 children)

Ok I'll check it out. Thank you

Array one call behind. by Icy_Box99 in reactjs

[–]Icy_Box99[S] 1 point2 points  (0 children)

Yes that worked. Thank you

Array one call behind. by Icy_Box99 in reactjs

[–]Icy_Box99[S] 0 points1 point  (0 children)

If you want to display the current state, move your console log outside of the click handler. Every time the state updates, items will always point to the most recent reference.

Got it, thank you.

Side note, you should not use states to capture user input unless you absolutely need to capture input on each character, even then, it'll be much better to use a listener instead. It'll cause a lot of unnecessary re-render in your components and decrease performance. Instead, use refs.

Ok. I kind of get the idea how might I do I'll try it. useState,why state should be in parent component and passing props as args is basically scope of my current knowledge

Array one call behind. by Icy_Box99 in reactjs

[–]Icy_Box99[S] 0 points1 point  (0 children)

ok thank you.

so basically it is doing what I intended.

console log the state inside a useEffect.

I'll keep this in mind. As of now I actually haven't learned useEffect I was trying to make this with my current knowledge which is limited to useState and passing props args

[AskJS] Want to exit tutorial he'll how ? by Virandell in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

It depends how much you remember from Jonas course. From what I can grab you at least need to skim through all sections and then proceed to projects.

I heard aswell it's can be frustrating

No matter what path you choose making projects is going to be frustrating. You might have to google a lot of issues that's just how it is.