Skip to content

Instantly share code, notes, and snippets.

View emmabostian's full-sized avatar
💻
They see me codin', they hatin'

Emma Bostian emmabostian

💻
They see me codin', they hatin'
View GitHub Profile
function diffArray(arr1, arr2) {
let arr1UniqueItems = arr1.filter(item => arr2.indexOf(item) < 0);
let arr2UniqueItems = arr2.filter(item => arr1.indexOf(item) < 0);
return [...arr1UniqueItems, ...arr2UniqueItems];
}
function isIsogram(str) {
// Turn string into array w/ lowercase letters
let arr = str.toLowerCase().split('');
// Create a set out of the array we just made
let set = new Set(arr);
// If the set and array have the same length, it's an isogram
return set.size === arr.length;
}
import React, { useState } from "react";
import { animated, useSpring, config } from "react-spring";
import "./styles.css";
export default function App() {
const [progress, setProgress] = useState("0%");
const props = useSpring({ width: progress, config: config.slow });
return (
<div className="App">
<div className="button-bar">
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
20 tips for developers in 2020
1. Create your toolbox
2. Don't compare yourself to others
3. Pick one skill at a time to work on and learn it until you feel comfortable
4. Find a mentor
5. Decide if you want to be vertical or horizontal in knowledge
6. Learn how to debug
7. Take breaks
8. Do a little bit each day
import React from "react";
import ReactDOM from "react-dom";
function App() {
return (
<div className="App">
</div>
);
}
import React from "react";
import ReactDOM from "react-dom";
import Gallery from "./Gallery";
import "./styles.css";
function App() {
return (
<div className="App">
<Gallery />