Skip to content

Instantly share code, notes, and snippets.

View brittanydionigi's full-sized avatar

Brittany Dionigi brittanydionigi

View GitHub Profile

Scope Practice

For each exercise, tell me in what order each of the logs are executed, and what each of them will actually log.

In order to complete these exercises, you must understand the following concepts:

  • hoisting
  • variable assignment/reassignment vs. variable declaration
  • the three scoping levels: global, functional and block
  • the scoping levels that var/let/const adhere to

Prototype Practice

1. Given the following dataset, return an array of just the front-end classrooms

let classrooms = [
  { roomLetter: 'A', program: 'FE', capacity: 32 },
  { roomLetter: 'B', program: 'BE', capacity: 29 },
  { roomLetter: 'C', program: 'FE', capacity: 27 },
 { roomLetter: 'D', program: 'BE', capacity: 30 },
@brittanydionigi
brittanydionigi / ss-hw.md
Created May 18, 2018 21:20
Sorting Suite Homework

Comment Your name with a link to your sorting suite repo

Read/Review

Practice

Often times, you'll be jumping into a pre-existing codebase and working with other people's code rather than writing a fresh app from scratch on your own. Sometimes the code is poorly tested or documented, and the previous developers may have moved on and taken their domain knowledge with them.

Navigating other's code, especially when it's broken, can lead you down some frustrating rabbit holes. Having solid debugging skills and understanding error messages will make this part of your job much easier.

// Given an array of categories and an array of trivia questions,
// return an object that summarizes the number of questions in each
// category and the average difficulty of those questions like so:
{
"Entertainment": {
"numberOfQuestions": ?,
"averageDifficulty": ?
},
"General_Knowledge": {
"numberOfQuestions": ?,

Example 1

Before

if (this.explode === 'no') {
  let playerImage = new Image();

  playerImage.src = 'assets/airplane.png';
  context.drawImage(
    playerImage,
@brittanydionigi
brittanydionigi / pizza-party.html
Last active November 28, 2018 17:37
Object & Array Practice
// HTML SECTION
<h1>Papa Turing's Pizza</h1>
<h2>Review Your Order</h2>
<ul id="order-details"></ul>
<button id="submit-order">Place Order</button>
// JAVASCRIPT SECTION
@brittanydionigi
brittanydionigi / manifest.json
Created December 6, 2017 13:37
hotMark Web App Manifest
{
"short_name": "hotMark",
"name": "Your Favorite MarkDown Previewer",
"background_color": "#dcaffd",
"theme_color": "#74c7fd",
"display": "fullscreen",
"icons": [
{
"src": "img/icon-48.png",
"type": "image/png",

The Game of Life

Write some code that evolves generations through Conway's "game of life". The input will be a game board of cells, either alive (1) or dead (0).

The code should take this board and create a new board for the next generation based on the following rules:

  1. Any live cell with fewer than two live neighbours dies (underpopulation)
  2. Any live cell with two or three live neighbours lives on to