I wanted to make a program that would play random songs from a list of songs. I knew how to randomize a value with the Math.floor(Math.random()) that I learned here. And I knew I had to make the list of songs an Array. Then it was just a matter of using math.random to target the array and pull out one of the songs,…then…well figuring out how to make the program open a tab and insert the value of the array into the url destination of the tab took a bunch of reading and extra book work to figure out,…but because of FCC I kind of felt like I had all the building blocks I needed (the functions) I just had to figure out how to get them to work together.
…then once it was working I was pretty excited. But then when I imported it all into the browser,…google broke it. So I spent hours reading their API (because FCC has taught me it’s not all about the classes/lessons here, you have to read and study on your own)…so then after reading the google API I figured out why and how they broke my program (security reasons) and I was able to figure out how to rewrite it and make it all work within their browser.
I actually just posted about this project in the ‘project feedback’ section of this forum.
But it’s pretty much all due to FCC and just being tenacious and enjoying coding and figuring out how things work and why.
But anyway you were talking about arrays and why they’d be useful. They’re useful because it’s like a file cabinet full of information. Then you have to use functions to target and pull out the specific data you want to use,…then use other functions to do something with the values you’ve extracted.
…at least so far that’s how it seems to me. I’m pretty far from an expert. I’m just a camper like you trying to figure it all out as I go.