Codecademy Forums

Beat Mix - getNeighborPads clarity

Hey all - I’m having trouble understanding what exactly the Bonus portion of the Beat Mix project (Project 2) is asking. See below from the project:

As a bonus, you can choose to implement a function in script.js to play multiple synthesizer tones at once by writing:

  • a function called getNeighborPads that accepts an x, y, and a size parameter. In the application, these values refer to the synth grid: x and y zero-indexed from the bottom left of the grid, and size is a number representing the number of rows/columns in the square. getNeighborPads should return an array of neighbors, each in the form [xValue, yValue] . Neighbors are the squares immediately to the left, right, above, and below a grid position.

I’m having trouble deciphering what they are describing and why they are describing it. Do these pads only execute if a square block of the pads (whether “sized” 1x1, 2x2, 3x3) are triggered? So lost. Help!