Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View madodela's full-sized avatar
💡

Loli Delgado madodela

💡
  • Wizeline
  • Aguascalientes, Ags
View GitHub Profile
@madodela
madodela / Typeahead.tsx
Created October 25, 2022 21:31
Creating a basic typeahead with React, Typescript and styled-components
import { useRef, useState } from "react";
import styled from "styled-components";
const Typehahead = styled.input`
width: 300px;
height: 36px;
border-radius: 5px;
padding: 8px;
`;
@madodela
madodela / Calculator.js
Created April 5, 2016 20:08
Basic Calculator tested with Jasmine
var Calculator = {
add: function (addend1, addend2) {
return addend1 + addend2; // sum
},
sub: function (minuend, subtrahend) {
return minuend - subtrahend; //difference
},
div: function (dividend, divisor) {
return divisor && dividend/divisor; //quotient
},