Midterm - Lecture 1 - WEBAPPS
Midterm - Lecture 1 - WEBAPPS
JavaScript Parts
Week 6
WEB APPLICATIONS DEVELOPMENT - CIT
Learning Outcomes
1. Understand JavaScript operators and its use.
2. Understand functions, comments and it’s uses.
3. Understand iteration and loops.
3
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
JavaScript Operators
WEB APPLICATIONS DEVELOPMENT - CIT
JavaScript Operators
5
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Arithmetic Operators
Arithmetic Operators perform arithmetic on numbers (literals and variables)
6
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Assignment Operators
Assignment Operators assign values to JavaScript variables. You can
use const, let and var for assigning a value to variable.
7
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Logical Operators
Logical operators are used to determine the logic between variables or
values. (AND, OR, NOT)
8
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
JavaScript Functions
WEB APPLICATIONS DEVELOPMENT - CIT
JavaScript Function
A JavaScript function is a block of code designed to perform a particular
task.
A JavaScript function is executed when “something” invokes it (calls it).
10
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
11
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Why functions?
- You can reuse code: Define the code once, and used it many
times.
- You can use the same code many times with different
parameters to produce results.
12
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Why functions?
- You can reuse code: Define the code once, and used it many
times.
- You can use the same code many times with different
parameters to produce results.
13
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
JavaScript Comments
WEB APPLICATIONS DEVELOPMENT - CIT
JavaScript Comments
- JavaScript comments can be used to explain the JavaScript code,
and make it more readable.
15
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
WEB APPLICATIONS DEVELOPMENT - CIT
Multi-line Comments
- Multi line comment starts with /* and it ends with */
16
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN
JavaScript Loops
WEB APPLICATIONS DEVELOPMENT - CIT
18
SYSTEMS PLUS COMPUTER COLLEGE - CALOOCAN