Skip to content

Instantly share code, notes, and snippets.

View iliacodes's full-sized avatar

Iliacodes iliacodes

  • Canada
View GitHub Profile
@iliacodes
iliacodes / sumLargestNumbers.js
Created October 6, 2022 17:14
Kata 1 - Sum the Largest Numbers Assignment
function sumLargestNumbers(data) {
var a = data[0];
var b = data[0];
for(i = 1; i < data.length; i++) {
if (data[i] > a) {
b = a;
a = data[i];
} else if (data[i] > b) {
b = data[i];
}