I started to learn javascript and I need some help.
I need to insert prompt inputs into array and read from it.
var array = [
["Cat","Black","Awesome"],
["Dog","White","Funny"],
["Chicken","Brown","Delicious"]
];
array.push(prompt("Animal name:"));
array.push(prompt("Animal color:"));
array.push(prompt("Type or something:"));
If I do something like that and I want to write it out, the output is:
Cat,Black,Awesome
Dog,White,Funny
Chicken,Brown,Delicious
And my prompt output is (example):
Elephant
Blue
Big
How would I insert prompt into array that the output would be as above.
Thank you very much for your answer.
I know it's some basic stuff but I've checked a lot of websites and couldnt find an answer.
array.