MV make a character learn all spells from ID 10 to 100?

Is there a quick way to do that (I suppose there is, but I don't know how to do it lol)?
for (let i = 10; i < 101; i++) { $gameActors.actor(1).learnSkill(i); }

Or do you want them to only learn the 'magic' ones from that region?
It worked, thank you.

Original thread: https://forums.rpgmakerweb.com/threads/make-a-character-learn-all-spells-from-id-10-to-100.166129/