MV Learn random skill upon equipping a weapon utilizing Yanfly Item Core

Hello everyone,

I hope you are well.

I was hoping somebody could point me into the right direction with this.

I would like the player to get access to a skill upon equipping a staff. I wanted this skill to be from a random list of skills.
So every time the player finds a Staff in the game it will contain a random skill.

After doing a bit of research I understand that I could do this by using Yanflys Item Core function:

Sadly my Java Script knowledge is very limited, this is what I gathered so far and I was hoping somebody could give me a bit of advice.
Thanks in advance

<On Creation Eval>

var possibleSkills = [8, 9, 10];

var index = Math.randomInt(possibleSkills.length);

var skillId = possibleSkills[index];

</On Creation Eval>

Original thread: https://forums.rpgmakerweb.com/threads/learn-random-skill-upon-equipping-a-weapon-utilizing-yanfly-item-core.126179/