Skip to content

Instantly share code, notes, and snippets.

View brittanydionigi's full-sized avatar

Brittany Dionigi brittanydionigi

View GitHub Profile
if body.Status == nil {
body.Status = "ACTIVE"
}
# invalid operation: body.Status == nil (mismatched types string and nil)
## Data
`score: 90%`
`name: 'Brittany'`
`assignedReviewer: 'Devon'`
`name: 'Devon'`
`studentName: 'Brittany'`
`status: 'accepted/deferred/pending'`
<html>
<head>
<style type="text/css">
#main { padding: 100px; border: 2px solid pink; }
.blue { background-color: blue; }
</style>
</head>
<body>
<div id="main">Lorem ipsum dolor!</div>
<script type="text/javascript">
@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);
}

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

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

@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

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: {

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

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