pickRandom learning


#1

I was used to try the random function after leaning. It seems that the “color” can’t be typed for random function. Does anyone know what’s the problem?


#2

Hello,
Are you trying this in the Code Sandbox? If you can paste your code here we can better understand what is going on :slight_smile:

Thanks,
Ahsen


#3

Is it a must to set an array for the random?


#4

Hello,
Are trying to use the pickRandom function somewhere else that isn’t using it? Then the code in that lab will fail. Remember the examples are limited to what you can use per lab. So you can’t always use the previous functions in every lab. Also you can’t go back to simpler solutions and use the more advanced techniques you learn later on in the other labs. But in real life you can for projects as they are not limited to a particular code lab. I hope that makes it clear, have fun coding :slight_smile:

Thanks,
Ahsen


#5

Thanks for answering my question!:smile: