Skip to content

Instantly share code, notes, and snippets.

// input string
// output should be p
// their string assessment required finding the first html element that if changed could make the html correctly formatted, this reminded me of the valid parens problems. But you get a string as input and then you have like 5 types of html elements opening and closing that are possible. So for this: "<div><p>hello</i></div>" the output would be "p"
// we can change the problem to return true false if valid html
const exampleStr = "<div><p>hello</i></div>" // expected p
const exampleStr2 = "<div><p><i>hello</p></div>" // expected i
const exampleStr3 = "<div>"
import { useState } from "react";
import "./styles.css";
// 1. 2 players, alternating
// - display who's turn it is
// 2. shape of the game state 3x3 grid
// 3. reset button clear state
// 4. disable ability to click a board that's been filled
// 5. check if board is done, win, draw combinations
// [[1-1, 1-2, 1-3][2-1, 2-2, 2-3][3-1, 3-2, 3-3]]
import React, { Component } from 'react';
import { connect } from 'react-redux';
class ColorList extends Component{
constructor (props){
super(props)
this.state = {}
this.colorsSelected = []
}
@misspran
misspran / gist:7784e572ea2297e3fa487dec4e0dd73c
Created August 31, 2017 14:34
Beast #1 runWithDebugger
function runWithDebugger(ourFunction, argumentArray){
debugger;
ourFunction.apply(this, argumentArray);
}
function sayFullName(first, last) {
console.log(first + ' ' + last);
}