Skip to content

Instantly share code, notes, and snippets.

View santiago7r's full-sized avatar

Eddy Rhenals santiago7r

View GitHub Profile
@santiago7r
santiago7r / magic-square.js
Last active September 9, 2024 13:44 — forked from tawn33y/magic-square.js
3x3 Magic Square
// To run the code, uncomment the following:
// console.log(generateGrid());
// console.log(test(50));
// --------------------------------------------------------------------------------
// helper functions
// --------------------------------------------------------------------------------
export const sum = (...arr) => arr.reduce((acc, curr) => {
acc += curr;