© Anjana Fernando and Lakmal Warusawithana 2020
A. Fernando, L. WarusawithanaBeginning Ballerina Programminghttps://doi.org/10.1007/978-1-4842-5139-3_2

2. Programming Basics

Anjana Fernando1  and Lakmal Warusawithana2
(1)
Mountain View, CA, USA
(2)
Mountain View, USA
 

In this chapter, you will learn the basics of programming, such as how to use simple data types and variables, how to implement flow control, and how to organize and reuse logic by writing your own functions.

Types and Variables

Variables are simply locations in memory with a given name. This gives you a chance to store something in memory to be later used or modified in your program. Every variable has a type associated with it that defines the values that can be stored in the variable. ...

Get Beginning Ballerina Programming: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.