JavaScript (Duckett) chap 1 Flashcards
Flowcharts
Flowcharts help us organize and transfer unto paper a visual representation of how our program works.
What is sytntax? What is a task?
Every language has ots own vocabulary (words used to communicate with computers) and syntax (how those words are put together).
Task is just a programmer word for a job your code aims to accomplish. In a flowchart you jot down different tasks/chores your code can and does accomplish, the arrows linking the tasks would show how one task moves on to another or leads to a decision query.
What is a script
Series of instructions a computer uses to help you, organization, end-user solve a problem.
Html,css,Js are all …
Text fileswith each having its own unique syntax & extensions. Each language serves as a layer working together to create a webpage. Content, presentation, behavior layers.
How do you link your JavaScript files to your html file and css file.
Your Js file is linked primarily to your html file by usong the tag and src element.
Objects and their characteristics.
Objects are ‘physical things’. Every object has a property, or a characteristic, just like every thing has a property. Properties tend to be name & value. Your sneakers are grey asics, so there you have a name and a property. An object with a name pool with our desired value whether it existed or not, boolean answer for our apt. being true.
Instance
An instance is an occurence of a thing or an object in the code you’re dealing with. You have one instance of a iPhone and you have 20+ instances of words in this definition.
Events
An event is a happening. The computer says hey this just happened. Objects through the use of users can help initiate happenings or events. Events can even happen when users simply scroll down a screen, something happened, lets throw an event! Browsers have many events you’ll need to learn so you can use them to help trigger code that correpond with those events.
Events happen we CALL a method.
Methods
Methods are subsets of code that accomplish a task. Methods do stuff. You often don’t need to know how a method works but might need to know howcto use it , meaning how to make it answer a question and accomplish a task based on that question. You can create methods and many objects in Js have built-in methods you’ll need to learn and use.
changeSpeed( ) is an example of method you might create in a web app that helps change speed if an accelerator is pushed.
Methods are CALLEd
Everything in Programming is an object. A browser has a document and window object. Explain what an object such ad these have?
Every thing has at least properties, but can have methods and events. Essentially to be a good programmer you’ll need to learn how to create methods and utilize events. There are many events you’ll need to be aware of and many built-in methods you don’t want to have to recreate. Know these 3 parts of an object and you’ll go far kid.
You call … and trigger … with …
You call methods after triggering code with an event.
Progressive engancement in the building of a website is …
when you go from using just html to build your website, then include css, and finally the last behavior layer: JavaScript.
In the larger view of things every individual web page is a … created with a … or … .
webpages are separate documents.
Your about page, your contact page, your index page, all are just instances pf your websites document text objects. These separate web documents are given life by the browsers Js scripting rendering engine or interpreter and the browsers DOM (document object model).
Yes JavaScript is the behavior layer but it’s main job is to increase the … of your pages just like the graphical window and document objects are used by the browser to improve ease of use for the user.
Interactivity. Ability to respond to users dynamically, and not just in a static content or presentation way, a behavior way. Your page behaves and interacts.
What would you use to write elements to your page?
document.write( ) method is used to write things to your page.