Code Snippets From Lecture

Week 4

Node Express EJS Templates

Here's a project all set up with basic static file serving, some route configruations, and some advanced ejs templates.

https://github.com/ga-students/simple-node-express-ejs-template

Reddit allows you to search their own content. Here's their own description of how the search endpoint of their API works: Reddit Search API Documentation

Here's how you can make a request to search their API for kittens:

$.get('https://www.reddit.com/search.json', {
  q: 'kittens'
  }).done(function(data) {
    console.log(data);
  });

Week 3

Detecting keyboard interactions, moving things: https://repl.it/DBp4

Sorting, Reverse Sorting, and Shuffling: https://repl.it/CzDF/0

Week 2

Array Equality

a function that returns true if two arrays are equal: https://repl.it/Cqzr/1

JavaScript Clock

Look at the commits on the sol solution branch to see different implementations:

https://github.com/ga-students/js-clock-intervals/commits/sol

Intervals and Timeouts

Scopes and Closures

Iterators

results matching ""

    No results matching ""