Cells in a Range on an Excel Sheet LeetCode solution in JavaScript
1const toCharCode = (char) => char.charCodeAt();23var cellsInRange = function (s) {4const result = [];5for (let i = toCharCode(s[0]); i <= toCharCode(s[3]); i++) {6for (let j = s[1]; j <= s[4]; j++) {7result.push(String.fromCharCode(i) + j);8}9}10return result;11};