Skip to the content.

Code 201 Class 4 Reading Notes

Links are created using the <a> element. Users can click on anything between the opening <a> tag and the closing </a> tag. You specify which page you want to link to using the href attribute.

<a href="http://www.imdb.com">IMDB</a>

Open a link in a new window

<a href="http://www.imdb.com" target="_blank">Internet Movie Database</a> (opens in new window)

Layout

Javascript Functions, Methods, and Objects

Functions let you group a series of statements together to perfom a specific task. If different parts of a script repeat the same task, you can reuse the function (rather than repeating the same set of statements).

Declaring a function

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

Pair Programming

It’s a practice of two developers sharing a single workstation to interactively tackle a coding task together. It involves two roles: the Driver and the Navigator. The Driver is the programmer who is typing and the only one whose hands are on the keyboard. The Navigator uses their words to guide the Driver but does not provide any direct input to the computer. The Navigator things about the big picture, what comes next, how an algorithm might be converted in to code, while scanning for typos or bugs.

Pair programming touches on listening, speaking, reading, and writing. The abilities the pair will foster will serve them well in completing assignments, in their own communication and learning, in interviews, and in readiness for a job at a compnay that utilizs this agile practice.

<—BACK