Home



Key Questions:

1. What is the difference between HTML and CSS?

HTML describes the structure of a webpage and CSS is the styling element. It can be thought of as HTML being like the beams and bricks of a house, and CSS can be thought of as the paint and interior decoration on and within the house.

2. Describe control flow and loops.

Control flow
Control flow regulates fnuctions within a program and ensures that functions are executed sufficiently before proceeding to the next function. For example, control flow would ensure that you flush the toilet only after you've done your business, as opposed to beforehand.
Loops
Loops describe the repetition of a function or action to form a program. An example could be a program to describe a person's daily routine. Every day there are actions that would be repeated, for example: waking up, showering, eating breakfast, brushing teeth. All together, these actions can create a loop that covers a week.

3. Describe the document object model (DOM).


At first, the dom almost looks like a family tree, or the hierarchy of how a webpage is set out. It includes all different elements or attributes that are called nodes. The DOM is thought of as the gateway to all HTML elements that are apart of a website. The DOM is like the glue that binds HTML, CSS and JS together seamlessly. The DOM is a kind of API, it is easy to use, and it also allows people to manipulate HTML elements from the outside using JS or JQuery.

4. Describe accessing data from arrays v. objects

Objects describe properties and arrays contain ordered sets of values. Because of the two different nature of data, data from objects can be obtained in much the same way. For example, let's say I want to create a makeup look with a strong lip colour. I have a selection of lip shades in my collection.



Because I know the property of what I want, this would be the basis of selecting my object. For example the entire object looks like this,

var = lipColour { matteLipShades: 'soft pink', 'nude', 'rose pink', 'midnight black'}

I know I want a specific object to complete my dark look, and of whats available, I know 'midnight black' to be the most appropriate shade for the look I'm going for.

Arrays are ordered datasets. An example can be measured or performance-based results, such as a horse race. Using an array, the data can be accessed according to placing. In Javascript, it is important to note that the numbers start at 0. For example, to find the horse who placed first in this imaginary race, one would search using 0 rather than 1. To find 2nd, we would use 1, 3rd would be 2 and so on.

5. What are functions and why are they helpful?

Functions describe the actions taken to complete a task. Functions allow one to add, delete, modify or add specifications, or to manipulate data. A user can create their own functions, which can be used to do a range of different things. A combination