This file contains 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
class Disk { | |
constructor(value) { | |
this.value = value; | |
this.next = null; | |
} | |
} | |
class Peg { | |
constructor() { | |
this.top = null; |
This file contains 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
export class CarBuilder { | |
// Tu código aquí 👇 | |
constructor() { | |
this.year = 0; | |
this.model = ''; | |
this.brand = ''; | |
this.color = ''; | |
this.price = 0; | |
this.isAvailable = false; | |
} |
This file contains 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
import { User } from "./user"; | |
export class Chat { | |
constructor() { | |
if (!Chat.instance) { | |
this.users = []; | |
Chat.instance = Object.freeze(this); | |
} | |
return Chat.instance; | |
} |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body> |
This file contains 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
(()=> { | |
const myCart = []; | |
const products = []; | |
const limit = 2; | |
async function getProducts() { | |
const rta = await fetch('http://api.escuelajs.co/api/v1/products', { | |
mehtod: 'GET' | |
}); | |
const data = await rta.parseJson(); |
This file contains 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
How can I delete all of my Git stashes at once? | |
https://stackoverflow.com/questions/11369375/how-can-i-delete-all-of-my-git-stashes-at-once | |
Stack Overflow | |
Products | |
Customers | |
Use cases |
This file contains 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
function useMedia(query) { | |
const [matches, setMatches] = useState(window.matchMedia(query).matches) | |
useEffect(() => { | |
const media = window.matchMedia(query) | |
if (media.matches !== matches) { | |
setMatches(media.matches) | |
} | |
const listener = () => { | |
setMatches(media.matches) |
This file contains 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
var e1start = e1.start.getTime(); | |
var e1end = e1.end.getTime(); | |
var e2start = e2.start.getTime(); | |
var e2end = e2.end.getTime(); | |
return (e1start > e2start && e1start < e2end || e2start > e1start && e2start < e1end); |
NewerOlder