RPGMaker MV Command to Optimize Equipment from an Event

Is there a way to optimize equipment in RPGMaker MV via an event like what could be done in VX?


VX used the following command


$game_actors[1].optimize_equipments


as detailed in the post below... but if I use this command in MV, I get the error shown below.


Screen Shot 2016-06-18 at 6.23.13 PM.png
because there is no such thing as $game_actors in MV.  VX and Ace use Ruby, MV uses Javascript.  Object names and method names have changed.  You can't just copy a bit of code that worked in one and expect it to work in the other.


$gameActors.actor(1).optimizeEquipments()
I figured the commands/code was different. That's why I asked. Thanks so much! That solves my issue.

Original thread: https://forums.rpgmakerweb.com/threads/rpgmaker-mv-command-to-optimize-equipment-from-an-event.63796/