Power of 2
jessberr (6)


Any hints of how to make this function print out an array of values like [1,3,9] instead of [3^0, 3^1, 3^2]. I'm sure it's simple, but I've gone down a rabbit hole trying to figure out what to do. Would I use something like reduce? Or would it be changing line 5 to push something different?

Thanks for everyone's patience?

You are viewing a single comment. View All
jessberr (6)

@Geocube101 Thank you! I had seen eval() but wasn't sure how to use it, so thank you so much!