Javascript Introduction
Welcome to Programming
- Recall that PNGs are graphic files.
The Language of Programming:
- Syntax - Vocabulary, formatting, and grammer
- Keyword - A language’s vocabulary.
- Values - the information a variable holds
- Control Structures - controls the flow of the program
- Commands (functions) - The commands we ask a program to complete.
Doing Things With Functions:
- Functions are collections of code that do something.
- Functions should really only perform one function. This makes understanding and reading the function much easier.
- Functions are declared using the keyword function.
- To call a function, call the name with its arguments in parenthesis.
Adding New Graphics:
- You can call functions by doing functionName(arguments)
Control the Flow with Conditional Statements:
- Conditional statements allow you to change how your program works
- Conditional statements allow you to react to the conditions the program is in.