👋🏼

Hi there!

You need to be logged in to view this course.

Practice: Product of All Numbers But This

Here's another practice question from Interview Cake, who kindly allowed me to use this other questions in this production.

Once again - I encourage you to do your best before watching all of the video. We can then try to solve it together!

Here’s the question:

Write a function getProductsOfAllIntsExceptAtIndex() that takes an array of integers and returns an array of the products.

Starter code:

//Given...
[1, 7, 3, 4]

//Return 
[84, 12, 28, 21]

//... in other words...
[7 * 3 * 4,  1 * 3 * 4,  1 * 7 * 4,  1 * 7 * 3]