extensions
Extension 1 - Objects
Learning Goal - We are learning how to:
Use objects to hold more than a simple value
Use arrays of objects to store lots of complex data
By the end of this topic you will have:
Gone through the slides.
Create a new JavaScript program that:
Creates a contact info object for a person
The person has a name, age and favourite food
Displays the name of the person
Uses a prompt to change the name of the person
Displays the new name of the person
Extra array task:
Create a contact list array
It will have at least three people
Display the details for the second person
Write a loop to display each person
Extension 2 - HTML & DOM
Learning Goal - We are learning how to:
Use JavaScript to modify the HTML page
Use get user input from the HTML page in to JavaScript
By the end of this topic you will have:
Gone through the slides.
Create a new page, including a JavaScript program that:
Has a text input box
Has a button
When the button is pressed it changes the page heading to the text the user has written in the input box
Extra style task:
When the button is pressed the background colour of the heading changes
Use the user input to select the colour
More:
Getting more out of your functions: Functions with parameters
Saving data between pages: Session storage