I usually do not have difficulty to read JavaScript code but for this one I can’t figure out the logic. The