Script call for learning multiple skills?

Hi everyone,

I have a really quick question- how would I go about teaching an actor multiple skills at once using the "Script" command? (As in, what is the JavaScript that would accomplish this?)

I need to teach an actor all of the skills in my game for testing purposes.

Thank you in advance for your help. 🙂
This should do it~
Code:
for (var n = $dataSkills.length; --n;) {
  $gameActors.actor(1).learnSkill(n);
}
I.e. loop over all skills, have actor 1 learn each one. 🙂
This should do it~
Code:
for (var n = $dataSkills.length; --n;) {
  $gameActors.actor(1).learnSkill(n);
}
I.e. loop over all skills, have actor 1 learn each one. 🙂

Thanks so much @caethyril- it worked like a charm! I honestly couldn't have clicked "Learn Skill" ~100 times- you really saved me. I couldn't have tolerated that tedium. 🤣 With this, my testing is completed.

Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-learning-multiple-skills.115204/