Skip to content

Instantly share code, notes, and snippets.

/**
*
* Independent Practice: Functions and Callbacks
*
* GOALS
*
* Your goal in this exercise is for the last line of code in this file to log
* the number of odd numbers in the array.
*
* DIRECTIONS
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
/*
- Sign up for openweathermap.org and generate an API key.
<!DOCTYPE html>
<html>
<head>
<title>Event Delegation</title>
<style>
#completed-list-div {
display: none;
}
.complete-task {
<!DOCTYPE html>
<html>
<head>
<title>A Few of My Favorite Things</title>
<style>
.complete-task {
}
.completed {
<!DOCTYPE html>
<html>
<head>
<title>A Few of My Favorite Things</title>
</head>
<body>
<h1>Working with the DOM</h1>
<h2>Favorite Things</h2>
<ul id="fav-list">
/**
Follow the instructions below to pratice turning JSON strings into JavaScript objects.
Try to use a JSON formatter (Chrome add-on) to help see JSON better in the browser
**/
let jsonString = '{ "title": "Uploads from everyone", "link": "https://www.flickr.com/photos/", "description": "", "modified": "2016-02-23T18:48:14Z", "generator": "https://www.flickr.com/", "items": [{ "title": "Edelweiss Air, Airbus A320-214, HB-IJU", "link": "https://www.flickr.com/photos/rs_1978/24588086024/", "media": { "m": "https://farm2.staticflickr.com/1552/24588086024_a8eb33a475_m.jpg" }, "date_taken": "2016-02-21T11:27:58-08:00", "description": " RS_1978 posted a photo: Paris-Zürich, CDG-ZRH", "published": "2016-02-23T18:48:14Z", "author": "nobody@flickr.com (RS_1978)", "author_id": "91733444@N08", "tags": "mountains schweiz aircraft berge airbus zürich ch a320 montagnes avions kloten flugzeuge olympusem5ii" }, { "title": "029.jpg", "link": "https://www.flickr.com/photos/jankcan/24591927533/", "media": { "m": "https://far
'use strict';
// JSON is a subset of the object literal notation of JavaScript; we use JSON to transfer data between programs.
// ---- RULES ----
// Property names must be double-quoted strings; trailing commas are forbidden.
// Leading zeroes are prohibited; a decimal point must be followed by at least one digit.
// Most characters are allowed in strings, except certain control characters.
// Strings must be double quoted.
// No comments!
//
// Create an HTML file (with all your JavaScript wrapped in a script tag) and then copy the below:
// 1. Suppose that we wanted to create a browser-based calendar program for keeping track of things. In comments, list at least three reasonable abstractions that you might use to build this program; for each abstraction, list out at least two properties and behaviors that it would make sense for that abstraction to have. Below is an example - please write your answer in the same format.
// 'Car'
// Description: Our app manages car sales.
// Every 'car' has
// - a make
// - a model
// - a year
// Every 'car' can
/* You can put your stuff in a repl.it or wherever you think is best
Work with a partner to create a specific animal object (so, monkey, rhino, etc), which has the following properties (or more!):
* name
* species
* foodsEaten
And the following methods:
* eatSomething(thingAsString)
/**
* Arrays
* Most of your answers should be stored in variables called q1, q2 etc..
* and the variables printed to the console.
* (i.e) console.log("Question 1" + q1)
*/
/**
* Question 1
* Create an array of image source filenames.