23
RUCHEN WYNGAARD Meet your educator

Coding and Technology Module 4 Lesson 5 Web Slides

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Coding and Technology Module 4 Lesson 5 Web Slides

R U C H E N W Y N G A A R D

Meet youreducator

Page 2: Coding and Technology Module 4 Lesson 5 Web Slides

Professional Diploma in

Coding and Technology

Lesson 5: JavaScript Objects, Properties and MethodsLesson 5: JavaScript Objects, Properties and Methods

Page 3: Coding and Technology Module 4 Lesson 5 Web Slides

Working with JavaScript functions

Understand JavaScript objects and properties

Practical demonstration

Lesson 5

Objectives

Page 4: Coding and Technology Module 4 Lesson 5 Web Slides

Functions and methods are often used interchangeably.

DID YOU KNOW?

Page 5: Coding and Technology Module 4 Lesson 5 Web Slides

Loading…

Page 6: Coding and Technology Module 4 Lesson 5 Web Slides

JavaScript functionsA JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when "something" invokes it (calls it).

Page 7: Coding and Technology Module 4 Lesson 5 Web Slides

Functions

Page 8: Coding and Technology Module 4 Lesson 5 Web Slides

Functions

Page 9: Coding and Technology Module 4 Lesson 5 Web Slides

Global and local

variablesGlobal variables Local variables

Page 10: Coding and Technology Module 4 Lesson 5 Web Slides

Global and local variables

Page 11: Coding and Technology Module 4 Lesson 5 Web Slides

Global and local variables

Page 12: Coding and Technology Module 4 Lesson 5 Web Slides

return statement

Page 13: Coding and Technology Module 4 Lesson 5 Web Slides

return statement

Page 14: Coding and Technology Module 4 Lesson 5 Web Slides

Loading…

Page 15: Coding and Technology Module 4 Lesson 5 Web Slides

JavaScript objects and propertiesAn object is a collection of properties, and a property is an association between a name (or key) and a value.

Page 16: Coding and Technology Module 4 Lesson 5 Web Slides

JavaScript objects and properties

Page 17: Coding and Technology Module 4 Lesson 5 Web Slides

JavaScript objects and properties

Page 18: Coding and Technology Module 4 Lesson 5 Web Slides

Creating objects with functions

Page 19: Coding and Technology Module 4 Lesson 5 Web Slides

Constructors

Page 20: Coding and Technology Module 4 Lesson 5 Web Slides

Creating methods

Page 21: Coding and Technology Module 4 Lesson 5 Web Slides

Loading…

Page 22: Coding and Technology Module 4 Lesson 5 Web Slides

Let’s code!

Page 23: Coding and Technology Module 4 Lesson 5 Web Slides

Completed lessons

1 2 4

5 6 7 8

3 See you soon for

L e s s on 6