This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build a react component that allows a cashier to change a value into several coins. | |
// Show 10 posibilities of changing the amount of money. | |
import React, { useState } from 'react'; | |
function CoinChanger() { | |
const [amount, setAmount] = useState(''); | |
const [combinations, setCombinations] = useState([]); | |
const coins = [25, 10, 5, 1]; // quarters, dimes, nickels, pennies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin("~/.vim/plugged") | |
" Theme | |
Plug 'dracula/vim' | |
" Language Client | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-python', 'coc-go', 'coc-java', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver'] | |
" TypeScript Highlighting | |
Plug 'leafgarland/typescript-vim' | |
Plug 'peitalin/vim-jsx-typescript' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Create a function to simulate change directory(cd) in your terminal, we want to find | |
in which folder you end up. | |
This function will automate the “$cd” command, so every item in the array is a cd command | |
Given a an array of paths where you will use cd path[i], find the result folder | |
Input: | |
paths string[], where paths[i] is a valid path. | |
paths[0] = will be your start folder, so it will be a valid path directory. |