Abstract
First, this chapter presents how to create functions and use them in your code to reduce the coding time and debugging time. It also increases the readability of code and will make your code cleaner and more concise. Then it presents how to create different type of arrays and offer some useful functions that can be applied to arrays such as finding the number of items, replacing items, inserting items, removing items, finding the index of an item, traversing through arrays, and reversing arrays.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Pradeeka Seneviratne
About this chapter
Cite this chapter
Seneviratne, P. (2019). Functions and Arrays. In: BBC micro:bit Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4913-0_10
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4913-0_10
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4912-3
Online ISBN: 978-1-4842-4913-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)