Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.19 KB

File metadata and controls

28 lines (22 loc) · 1.19 KB

what is variables

the data stored in a variable can change each time a script runs. and we can assign a value to them.

DATA TYPES

1-Numeric Data

2-String Data

3-Boolean Data

Arrays

arrays is a special type of variable it can store a list of value

the numbering of this list in the arrays starts at zero

EXPRESSIONS

Expressions evaluates into in a single value

there are two types of expressions:

1-Expressions that assign value to a variable 2-Expressions that use two or more values to return a single value 3-Expressions rely on things called operators they allow to create a single value from one or more values

type of operators

1-ARITHMETI C OPERATORS 2-STRING OPERATOR

RULES FOR NAMING VARIABLES:

1- The name must begin with a letter, dollar sign ($),or an underscore (_). It must not start with a number. 2- Use a name that describes the kind of information that the variable stores. For example, firstName might be used to store a person's first name, l astNarne for their last name, and age for their age. 3- All variables are case sensitive, so score and Score would be different variable names, but it is bad practice to create two variables that have the same name using different cases.