laksh5 (83)

When I try to find the length of "Powers", it says undefined. Please help! https://repl.it/@laksh5/SewperHewo

You are viewing a single comment. View All
heyitsmarcus (287)

You called your original power array powers, so you just left an s off of your variables in this line:

var powerer = power[Math.floor(Math.random() * power.length)];

Change to:

var powerer = powers[Math.floor(Math.random() * powers.length)];

If this solved your problem, please consider upvoting and marking my answer as the accepted answer to close this question. I'll continue to answer questions you may have.