Hey Dev.to!
It is almost Friday, so lets start the day with a fun task, sum two numbers together. But without summing the two numbers together like this, like you would do normally:
const num1 = 2;
const num2 = 3;
const result = num1 + num2;
console.log(result);
I start with my solution:
const num1 = 2;
const num2 = 3;
const arr1 = new Array(num1).fill(0);
const arr2 = new Array(num2).fill(0);
const result = arr1.concat(arr2).length;
console.log(result);
Will be fun to see what Frankenstein Solutions you folks come up with. ⚗️🧑💻
Top comments (0)