What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-27 07:05:02
queue data structure in javascript 2018
var Queue = (()=>{ const map = new WeakMap(); let _items = [] class Queue{ constructor(...items){ //initialize the items in queue map.set(this, []); _items = map.get(this); // enqueuing the items passed to the construc... Add solution -
TypeScript 2022-03-16 17:05:24
how-do-i-navigate-to-a-parent-route-from-a-child-route
// via router link // The RouterLink directive always treats the provided link as a delta to the current URL: [routerLink]="['/absolute']" [routerLink]="['../../parent']" [routerLink]="['../sibling']" [routerLink]="['./... Add solution -
Javascript 2022-03-11 09:00:19
button click navigate to another page angular
<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button> // myComponent.component.ts file import { Router } from '@... Add solution -
Javascript 2022-03-02 19:35:22
how to make a deck of cards in javascript
class Deck{ constructor(){ this.deck = []; this.reset(); this.shuffle(); } reset(){ this.deck = []; const suits = ['Hearts', 'Spades', 'Clubs', 'Diamonds']; const values = ['Ace', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jack', 'Queen'... Add solution
Best helpers
Ranking is empty