April 2015
Beginner
320 pages
7h 43m
English
In this chapter, you’ll revisit the Animal Sounds plugin from earlier, but this time, instead of using a switch statement, you’ll use a lookup table.
It’s time to take a closer look at objects. An object in JavaScript is something that can hold both data and functions. You’ve already been using objects throughout this book. You used the console object to log messages to the Minecraft server log and console window. You used the exports object to provide new properties and functions for others to use. You used array objects to sort arrays with sort(). Last but not least, you used some of Minecraft’s built-in objects such as Player and Event to respond to events that happen in the game.
Objects are useful ...
Read now
Unlock full access