This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write JS code so when a user clicks on one of the | |
// thumbnail images, that image should be displayed | |
// in the full size image container at the top. | |
// ********* MY ANSWER ************ | |
$(function() { | |
$('.thumbnail').click(function(event) { | |
$('.hero, img').attr(); | |
$('.hero').append( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Thinkful | Text analyzer example solution</title> | |
<meta charset="utf-8" /> | |
<meta | |
name="description" | |
content="Exemplary solution for the text analyzer project from Thinkful's Front End Web Development course" | |
/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// **** GLOBAL STATE OBJECT **** | |
var state = { | |
items: [], | |
}; | |
// **** HTML TO RENDER **** | |
var listItemTemplate = | |
'<li>' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example 1: ECHO ENDPOINT | |
'use strict' | |
const express = require('express'); | |
const app = express(); | |
app.get('/echo/:what', (req, res) => { | |
res.json({ | |
host: req.hostname, | |
path: req.path, | |
query: req.query, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const queryString = require('query-string'); | |
const app = express(); | |
const USERS = [ | |
{ | |
id: 1, | |
firstName: 'Joe', | |
lastName: 'Schmoe', | |
userName: '[email protected]', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET ALL | |
# Command that retrieves all restaurants | |
$ db.restaurants.find(); | |
# LIMIT AND SORT | |
# Find the command that makes the first 10 restaurants appear alphabetically by 'name' | |
$ db.restaurants. | |
find(). | |
sort({name:1}). | |
limit(10); |
OlderNewer