Skip to Main Content
Programming the BeagleBone Black: Getting Started with JavaScript and BoneScript
book

Programming the BeagleBone Black: Getting Started with JavaScript and BoneScript

by Simon Monk
May 2014
Beginner to intermediate content levelBeginner to intermediate
216 pages
4h 23m
English
McGraw-Hill Education TAB
Content preview from Programming the BeagleBone Black: Getting Started with JavaScript and BoneScript
5
Arrays, Objects, and Modules
In this chapter you will learn how to use JavaScript arrays, and we illustrate their use with BoneScript to make Morse code signals using the built-in LEDs. You will also be introduced to JavaScript’s concept of “objects,” which provides a very powerful but unusual mechanism for object-oriented programming.
image
Arrays
The variables you have encountered so far have only had a single value. JavaScript arrays are used to contain a list of values. You can think of an array as being rather like a stack of pigeonholes. You can take something out of a particular location, using its index position. In this case, 0 is used to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IoT Development for ESP32 and ESP8266 with JavaScript: A Practical Guide to XS and the Moddable SDK

IoT Development for ESP32 and ESP8266 with JavaScript: A Practical Guide to XS and the Moddable SDK

Peter Hoddie, Lizzie Prader
BeagleBone: Creative Projects for Hobbyists

BeagleBone: Creative Projects for Hobbyists

Charles Hamilton, Rodolfo Giometti, Richard Grimmett

Publisher Resources

ISBN: 9780071832120