reading-notes

Reading Notes

View the Project on GitHub simon-panek/reading-notes

Code 201: Class 04 - HTML Links, CSS Layout, JS Functions


HTML Text 74-93

Links

URL Uniform Resource Locator

Email Links

Opening Link in New Window

Linking to other parts of the same page

Linking to specific part of another page

HTML Text 358-404

Controlling the Position of Elements

Z-index property determines which box appears on top when out of normal flow and overlapping

Fixed Width Layouts

Liquid Layouts

Layout Grid

CSS Frameworks provide code for common tasks like creating layout grids

JS Text 86-99

Functions allow programmer to group a series of statements together to perform a specific task

Declaring a Function give it a name and then write its statements needed to achieve its tasks inside the curly braces


function sayHello() {
    document.write('Hello!');
}

Calling a Function can execute all of the statements between a functions curly braces with just one line of code in the location that programmer desires

Declaring functions that need information give a function information by providing parameters


function getArea(width,height) {
    return width * height;
}

Calling a Function that needs information specify the values it should use in the () following the name, these values are called arguments


wallWidth = 3;
wallHeight = 5;
getArea(wallWidth,wallHeight);

Getting a single value out of a function “returning a result”


function calculateArea(width, height) {
    var area = width * height;
    return area;
}
var wallOne = calculateArea(3,5);
var wallTwo = calculateArea(8,5);

Note: when the interpreter hits the return command it goes back to the statement that called it, subsiqent statements in the function would not be processed

Variable Scope location of where a variable is declared will effect where it can be used

6 Reasons for Pair Programming


Return to reading-notes Deployed Site

Return to reading-notes Mark Down