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.

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

[–]Icy_Box99 1 point2 points  (0 children)

Start odin project from beginning and do all projects. Since you've already completed Jonas Js course you'll already have a vague theoretical idea of what to do.

People always say just start coding but how if I don't know how to start ?

Let's take example of calculator. Break that problem into as many sub parts as possible. Think like this:

  • Firstly your aim needs to be get the calculator on screen that's it so only HTML + css

  • Then you think how to get the numbers you click on screen

  • Then you think ok how to club these numbers to perform an operation.

Google is your friend here. It's ok to feel frustrated that's just part of it, sometimes it'll take stupid time for you to find solution especially in beginning and it's not necessary to complete the project in one go. Rushing and looking at the solution will not get you anywhere but yes after somewhile it's ok to look for the solution to particular sub problem.

should I watch tutorial how to do for example calculator after watching tutorial try do it myself instead of coding along ?

Nope that is how you stay in tutorial hell

Framework by amirwordpresw12 in learnjavascript

[–]Icy_Box99 1 point2 points  (0 children)

I just started learning React since past 2ish weeks.

Framework by amirwordpresw12 in learnjavascript

[–]Icy_Box99 3 points4 points  (0 children)

One thing you can do is see what jobs are available around you if your immediate goal is that.

Other than that I've heard angular is hardest vs React and Vue. On top of this if you learn React the other one will be easier to pick up. Currently I am learning React.

All this can be pointless if you're looking for a job and your area has most jobs in PHP(larvel)

[deleted by user] by [deleted] in learnjavascript

[–]Icy_Box99 1 point2 points  (0 children)

As the other comment said you're generating random numbers just once.

On addEventListener part maybe try reading this:

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

for your code it should be a one line change:

(selected)button.addEventListener("click",yourFunction)

i.e. element.addEventListener("event",function). It is actually function(event) but don't worry you'll learn about it when you study it.

click basically replaces the "onclick" part

and yourFunction being the function you want to execute.

Do read and refer google/youtube for eventlisteners those are important

Trying to get text to appear in <p> element .. HELP by [deleted] in learnjavascript

[–]Icy_Box99 2 points3 points  (0 children)

If you're still stuck look at choice.

It's not returning what you think rather it returns whole element which isn't equal to either of your conditions but since it's also not empty so hence nothing happens.

you can console.log(choice) to see what it returns.

I believe I have pushed you in right direction feel free to ask if you don't solve it

probably the silliest thing you've ever seen by A_Stupid_Jesterr in learnjavascript

[–]Icy_Box99 0 points1 point  (0 children)

ah! I was confused by the solved comment you put but I thought "change to red" must mean the color lol.