Issue related to Js/React arrays

I’m creating an array indexes in which i’m appending values(this will later be used in a map function).

let indexes = [];
export default function SortTiles() {

    let num = info.num_tiles;
    for (let i = 10; i < num+10; i++) {
        indexes = [...indexes, i];
    }
    console.log(indexes);
    console.log("UWU")

    return(
        <div id={"sort-tiles"}>
            {/*{indexes.map(makeTiles)}*/}
        </div>
    )
}

But when i’m trying to console.log my array this is the output i’m getting:
The output image
The output is being printed twice and the numbers in the array is also duplicated.