#Read: 04a - Programming with JavaScript
Page 1-24 Intro:
- JavaScript makes web pages more interactive by enable you 1-accessing content (like selecting element), 2- modify content, 3- REACT TO EVENTS like selecting a button, and specify a rule the browser can follow.
CH1:
- Script includes instruction a computer can follow to achieve a goal.
- to write a script, you need to:
- define your goal and list what task you want to achieve; because script is performed in order to solve a problem.
- Design your script tasks; like sketching every step in flow-Chart. (try to think like a computer)
- Code this script step by step.
Expressions + Operators: 74 - 79:
- Expressions have two types:
- expressions that assign a value to a variable; Like name = ‘Noor’.
- expressions that use 2 or more variables in order to return a value; A= 2+3.
Operations:
- Assignment operators -> name = ‘Noor’
- Arithmetic Operators -> uses operators like + - / *%; A= 2+3 -> A= 5.
- Comparison operators -> Compare two or more Values, then return True/False; A= 7>2 -> A= True.
- Logical operators -> connect two or more expressions, then return True/False.
- String operators -> Combine Two or more strings; Major = ‘Web’ + ‘ Developer’ -> Major =’Web Developer’.