This is a little tricky; some explaining variables might make it simpler:

// BASE_CHARS_RANGES is a flattened sequence of range start, range end pairs
for (var i = 0; i < BASE_CHARS_RANGES.length - 1; i += 2) {
  var rangeStart = BASE_CHARS_RANGES[i];
  var rangeEnd = BASE_CHARS_RANGES[i+1];
  for (var charCode = rangeStart; charCode <= rangeEnd; charCode++) {
    ...