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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>YoungMinds - Digital Wellness for Young People</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; |
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
| use std::fmt; | |
| pub enum List { | |
| Cons(i32, Box<List>), | |
| Nil, | |
| } | |
| impl fmt::Display for List { | |
| fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
| match self { |
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
| const obj = {}; | |
| obj["Alpha"] = "Alpha"; | |
| obj["1"] = 1; | |
| obj["0.5"] = 0.5; | |
| obj["0"] = 0; | |
| obj["Beta"] = "Beta"; | |
| console.log(Object.keys(obj)); |
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
| function Decorator(label: string) { | |
| return (...args: unknown[]) => { | |
| console.log(label); | |
| } | |
| } | |
| @Decorator('a') | |
| @Decorator('b') | |
| class Person { | |
| @Decorator('c') |
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
| const name = Symbol("name"); | |
| const age = Symbol("age"); | |
| const obj = { | |
| [name]: "John", | |
| [age]: 29, | |
| }; | |
| console.log(obj[name]); | |
| console.log(obj[age]); |
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
| for (var i = 0; i < 3; i++) { | |
| setTimeout(() => { | |
| console.log(i); | |
| }); | |
| } |
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
| const Hello = () => { | |
| console.log("a"); | |
| useEffect(() => { | |
| console.log("b"); | |
| }); | |
| useLayoutEffect(() => { | |
| console.log("c"); | |
| }); |
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
| class RedLogger { | |
| constructor(prefix) { | |
| this.prefix = prefix; | |
| } | |
| log(text) { | |
| console.log(this.prefix, text); | |
| } | |
| } |
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
| export interface Page { | |
| id: string; | |
| name: string; | |
| url: string; | |
| title: string; | |
| description: string | null; | |
| priority: number; | |
| frequency: string; | |
| } |
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
| function remove(id: string, items: NavLink[]): NavLink[] { | |
| return items | |
| .filter(x => x.id !== id) | |
| .map(item => ({ | |
| ...item, | |
| children: remove(id, item.children), | |
| })); | |
| } |
NewerOlder