Cooks create recipes. A recipe for chocolate-banna cake is
here. Look at pages 1 and 2.
Objects
Incredients, pots, pans, utensils, stoves, freezers, and more
Operations
Chop, combine, heat, cool, and more.
Composers and song writers create instructions for playing music.
The musical score Sciliana by F. Carulli for guitar is
here.
Objects
Symbols for: staffs, notes, ties, rests, repeats, and more
Operations
Read the symbols for notes, rests, repeats, and more in the given
sequence, location on the appropriate staff and time duration to
produce music.
Instructions for repairing equipment. For example
DVD repair
Objects
Housing, screws, clips, front panel, disc tray. grease, alcohol,
and more.
Operations
Remove screws, look for clips, brace tray, grease, inspect and
more.
A
simple calculator example to show a web page with a form representing
a two number arithmetic calculator and its JavaScript program.
Objects
The input and output fields that contain numbers.
Operations
Read the numbers in the input fields. Do arithmetic on those numbers.
Write results to the output fields.
Slide set
Problem solving and
Algorithm DesignUse console.log(…)to see variable values.Use right click on a web page to see and copy the source text.
Click on script links to see the js files.
On click invoke function sayHello — do the instructions
named sayHello
The function alert(message_string) displays an alert popup
window containing the message_string. Occasionally, but rarely,
a useful way to display the values of variables when debugging a script.
Use primarily to notify users of something they must do.
Set the contents of an HTML element with .innerHTML
Modify the class used by an HTML element with
setAttribute(class, className)
Hide an element with setAttribute("hidden", "true")
Remove an HTML attribute, e.g. show a hidden field with
removeAttribute("hidden")
Use an if…then…else…
statement to deal with the name/no-name cases