My code is supposed to generate an amount of xp required for each level, but on levels 6, 8 and 13 the difference between the xp needed for the previous level and the xp needed for the current level decrease. My code is as follows
const BASE_LVL_XP = 20;
let xp_collection = new Map();
for (let i = 1; i < 101; i ++) {
// xp_collection.set(i, BASE_LVL_XP * .1);
let amount = BASE_LVL_XP * (Math.ceil(Math.pow((1.1), (2 * i))) + i);
xp_collection.set(i+1, amount);
}
I'm also not 100% sure about the math, I kinda ripped it off of the compound interest formula