Variables and operators
Some of the most basic elements of a programming language are variables and operators. Variables are storage locations where you keep information that you will use at some later point. For example, you can create a variable to track the number of notifications the user has in your prototype; that variable will determine how the notification badge is presented, and it will allow you to change its value according to the logic of your prototype.
It is important to give variables a clear name, normally using camelCase, for example, numberOfNotifications, or using underscore, for example, number_of_notifications notations since spaces are not allowed when naming the variables.
Operators allow you to perform arithmetic and ...
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.
Read now
Unlock full access