Skip to content

Instantly share code, notes, and snippets.

View brittanydionigi's full-sized avatar

Brittany Dionigi brittanydionigi

View GitHub Profile
@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

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 },

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

Problem Solving

Complete the following six problems on Code Wars. If you do not currently have an account, you can sign up/log in through your GitHub.

Before writing any code out/trying to implement your approach, be sure to practice psuedo coding (in natural language) how you intend to solve each problem. When you have code written and you're ready to see if any of your tests will pass, run the Run Sample Tests button on the bottom right hand corner of the screen. If all preliminary tests are passing, you should hitthe Attempt button to run additional tests. If you have ALL tests passing, you will be given an option to refactor your code before submitting your final solution.

  1. https://www.codewars.com/kata/vowel-count/train/javascript
  2. https://www.codewars.com/kata/implement-a-filter-function
  3. https://www.codewars.com/kata/rock-off/train/javascript

Weatherly Check-In

  • Readme has Wireframes
  • Project is using mock data
  • Project is using fetch to get api data

Project has the following component files

  • App
  • Search
  • Current Weather
const constellations = {
orion: {
names: ['Orion', 'The Hunter', 'The Giant', 'The Deer'],
stars: ['Betelgeuse', 'Rigel', 'Bellatrix', 'Mintaka', 'Alnilam', 'Alnitak', 'Saiph']
},
ursaMajor: {
names: ['Ursa Major', 'The Big Dipper', 'The Great Bear', 'The Plow'],
stars: ['Dubhe', 'Merak', 'Phecda', 'Megrez', 'Alioth', 'Mizar', 'Alkaid']
},
ursaMinor: {
@brittanydionigi
brittanydionigi / initializing-new-repos.md
Last active November 13, 2019 14:24
Tips for Initializing a new repo

These instructions are for whichever group member is going to create the GitHub repo under their account. Other groups members will collaborate after these steps have been completed by one member of the group. You should still step through these together so everyone is aware of what goes into setting up a new repo.

Creating the GitHub Repo

  • Use the GitHub UI to create a new repo, and make sure you initialize it with a README and a .gitignore file. You can select a preset .gitignore file from the dropdown menu. Node is usually a good one to choose. (Feel free to read more about gitignore files here). You can disregard the 'Add license' option.

  • Make sure your repo has a relevant title and description. If you ultimately deploy your application so that it has a URL, you'll want to update your description to include a link to the deployed version.

new-repo

Add a link to your github repo for GameTime as a comment on this gist.

Goals

By the end of this lesson, you will be able to:

  • Understand the order of execution for JavaScript code and why it matters
  • Describe the differences between var, let and const and when to use each
  • Predict how variables will behave when multiple scopes are involved

Vocab

@brittanydionigi
brittanydionigi / myjQuery.js
Created July 9, 2019 14:20
little pretend jQuery
function $(selector) {
function selectWithJS() {
let selectorType = selector.split('').shift();
let selectorName = selector.substr(1);
if (selectorType === '#') {
return document.getElementById(selectorName);
} else {
return document.querySelectorAll(selectorName);
}