JSFiddle - React, Tailwind, and code Playground
JavaScript
/**
* @param {number[]} stones
* @return {number}
*/
var lastStoneWeightII = function(stones) {
console.log(stones);
/* while (true) {
let i = 0; */
//
for (let j = 0; j < stones.length; j++) {
console.log('j', j);
}
//
/* if (i++ === 5) {
break;
}
} */
};
lastStoneWeightII([2, 7, 4, 1, 8, 1])