Building an interval-based grid
You can take advantage of the fact that you're iterating in increasing order, i.e. the trivial fact that if a number is greater than n, then it's also greater than any number below n; thus you can just keep track of the latest threshold you passed and only check if you've reached the next one.

let thresholds = [2, 4, 5, 10, 50, 100, 1000];
let increments = [0.01, 0.02, 0.1, 0.5, 1, 10];
let p = 0;

function createKeysWithTicks(array) {
    let i = 1.0;
    while (i &lt; 1000) {
        array.push(Number(i.toFixed(2)));
        i += increments[p];
        if (i &gt;= thresholds[p]) {
            p++;
        }
    }
 }