0% found this document useful (0 votes)
6 views30 pages

JS 1

The document outlines a web development class focused on JavaScript, covering topics such as data types, variables, operators, and control flow. It includes learning objectives, a tutor profile, and class tasks designed to enhance students' understanding of JavaScript fundamentals. Additionally, it provides resource materials for further learning and encourages students to share their experiences and expectations in the field of software development.

Uploaded by

osyagbatac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views30 pages

JS 1

The document outlines a web development class focused on JavaScript, covering topics such as data types, variables, operators, and control flow. It includes learning objectives, a tutor profile, and class tasks designed to enhance students' understanding of JavaScript fundamentals. Additionally, it provides resource materials for further learning and encourages students to share their experiences and expectations in the field of software development.

Uploaded by

osyagbatac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Web

Developmen
t
Week 2 Class 1
HTML5 Continuation
Web
Development
JavaScript Class
1
Intro. To JavaScript
Tutor Profile

Name: Okechukwu Promise

Email:
[email protected]

Hobbies: Anime, Music, Movies

Linkedin: linkedin.com/
promiseokechukwu

WhatsApp: +2347012897856
Learning Agenda

01 Introduction to JavaScript

02 JavaScript Data Types, Variables and Operators

03 Control Flow and Conditional Expressions


Learning Objectives

At the end of the sessions, students should be able to:


• Grasp the fundamental concepts, syntax, and rules of JavaScript.
• Identify and use different data types in JavaScript (Numbers, Strings,
Booleans, Objects, Null, and Undefined).
• Apply various operators (Unary, Comparators, Ternary) in JavaScript.
• Use conditional expressions such as if-else, nested if-else, switch-case,
and ternary operators to control the flow of a program.
00
Previous
Lesson
Previous Session

HTML & CSS


01
Ice - Breaker
Ice - Breaker

Each student will share


with the class their
experience working with
HTML and CSS
01
INTRO. TO JAVASCRIPT
INTRO. TO JAVASCRIPT

Definition: JavaScript is a dynamic, high-level, interpreted programming


language that enables interactive web pages. It is one of the core
technologies of the World Wide Web, alongside HTML and CSS.

Purpose: JavaScript is used to create interactive effects within web


browsers. It enhances user experiences by enabling dynamic content
updates, form validation, animations, and handling events such as clicks
and keypresses.

How It Works: JavaScript runs directly in the browser as a client-side


script. It interacts with HTML and CSS to manipulate the Document Object
Model (DOM), allowing developers to update and alter web page content
without needing to reload the page.
JAVASCRIPT IMPORTANCE TO SOFTWARE DEV.
• Interactivity: JavaScript is essential for adding interactivity to
websites, making them more engaging and user-friendly.

• Dynamic Content: With JavaScript, developers can create dynamic


content that can change in response to user input, time, or other
conditions, without requiring a full page reload.

• Cross-Platform Compatibility: JavaScript is supported by all modern


web browsers, making it a universal tool for web development.

• Versatility: JavaScript is not only used on the client-side but can also
be used on the server-side (e.g., with Node.js), allowing full-stack
development with a single language.
02
DATA TYPES,
VARIABLES &
OPERATORS
• Numbers: Represent both integer and floating-point
numbers. DATA TYPES
Example: let age = 25; or let pi = 3.14;
• Strings: A sequence of characters used to represent
text.
Example: let name = "John Doe";
• Booleans: Represents logical values: true or false.
Example: let isStudent = true;
• Objects: Complex data structures used to store
collections of data.
Example: let person = { firstName: "John",
lastName: "Doe" };
• Null: Represents an intentionally empty or non-
existent value.
• Undefined: Indicates a variable that has been
OPERATORS
Operators in JavaScript are symbols that are used to perform
operations on variables and values. They are fundamental to
manipulating data in JavaScript, allowing you to perform arithmetic
calculations, comparisons, logical operations, and more.
Arithmetic Operators:
Used for mathematical calculations: +, -, *, /, %.
Comparison Operators:
Compare values: ==, ===, !=, !==, <, >, <=, >=.
Example: let isEqual = (5 === 5);
Logical Operators:
Combine or invert Boolean values: && (AND), || (OR), ! (NOT).
Example: let result = (true && false);
Ternary Operator:
A shorthand for if-else conditions: condition ? expr1 : expr2;
Example: let status = (age >= 18) ? "Adult" : "Minor";
VARIABLES
Variables in JavaScript are containers for storing data values.
They are fundamental to programming, allowing you to label
and store information in your code that you can later
reference and manipulate.

Key Concepts:
Declaration:
let: Block-scoped variable declaration.
const: Block-scoped constant declaration.
var: Function-scoped (legacy) variable declaration.
Assignment:
Assign values to variables using the = operator.
Example: let color = "blue";
00
Ice - Breaker
Ice - Breaker

Each students will share their


expectation for the remainder of
their software development
journey
03
CONTROL FLOW &
CONDITIONAL EXPRESSIONS
CONTROL FLOW (CONDITIONAL STATEMENTS)
Control flow in JavaScript refers to the order in which individual statements,
instructions, or function calls are executed or evaluated. By using control flow
statements, you can determine the direction your program will take based on
conditions, loops, or other structures. This allows you to create dynamic and
responsive code that can react to different inputs and situations.

Conditional Expressions:
• If statement

• If-else statement
CONTROL FLOW (CONDITIONAL STATEMENTS)
• else-if statement

• switch statement
00
Summary
SUMMARY
SUMMARY
Resource materials

https://www.w3schools.com/js/

https://www.freecodecamp.org/news/learn-javascript-for-beginners/
00
Class Task
Class Task
1. Create a program that asks the user for their score in a test (between 0
and 100).
Use an else if ladder to determine and display the grade:
• 75 to 89: "Grade: B"
• 50 to 74: "Grade: C"
• 35 to 49: "Grade: D"
• Below 35: "Grade: F"
• 90 and above: "Grade: A"
2. Use a switch statement to display the name of the
corresponding day.
• Write a program that takes a number between 1 and 7 from the
user, where 1 represents Monday and 7 represents Sunday.
00
Assignment
Assignment

Make research on:

1. Loops in JavaScript
2. Functions
THANKS!
ANY QUESTIONS?
[email protected]
+234 8020 421 838
https://lmtechub.org

lmtechub

lmtechies

lm-tech-hub

lmtechub

You might also like