From f6397e14fe3e7c02ecb74e18a54bb68f513caf21 Mon Sep 17 00:00:00 2001 From: daniel corcoran Date: Thu, 4 May 2023 21:05:53 +1000 Subject: [PATCH] feat: update sandbox --- src/sandbox/i.ts | 54 ++++++++++++++++++ src/sandbox/index.ts | 128 ++++++++++++++++++++++++++++++------------- 2 files changed, 143 insertions(+), 39 deletions(-) create mode 100644 src/sandbox/i.ts diff --git a/src/sandbox/i.ts b/src/sandbox/i.ts new file mode 100644 index 0000000..34ec120 --- /dev/null +++ b/src/sandbox/i.ts @@ -0,0 +1,54 @@ +const hi = 'hi'; + +const hid = 'hi'; + +const hig = 'hi'; + +export { + hi, hid, hig +}; + +const foo = () => { + const foo = 'bar'; + + const fobar = 'fobar'; + + if (fobar === 'dd') { + console.log('fobor'); + } + + const n = new Date().getDay(); + + switch (n) { + case 2: + console.log('haha'); + break; + case 5: + console.log('hahaa'); + break; case 6: + console.log('hahadd'); + break; + default: + console.log('kh'); + } + + const arr = [ 1, 2, 3, 45, 6, ]; + + const obj1 = { 'daniel': 'email@outloog.com' }; + + const fo = fobar; + + const bademail = 'daniel@outlook.com'; + + const tern = fobar.length > 33 + ? 'tern' + : 'terna'; + + if (tern.length > 0) { + console.log(tern); + } +}; + +const nosemi = 'nosemi'; + +console.log(nosemi); \ No newline at end of file diff --git a/src/sandbox/index.ts b/src/sandbox/index.ts index ee6edfb..408429f 100644 --- a/src/sandbox/index.ts +++ b/src/sandbox/index.ts @@ -1,75 +1,125 @@ +import { hi } from './i'; +import { hid } from './i'; + +class Dasdas { + constructor () { + + } +} + const foo = () => { - - const foo = 'bar'; + const fofo = 'bar'; + + const ff = '44'; + + const ff53 = 'f'; + const fobar = 'fobar'; - + if (fobar === fobar) { - console.log('fobor'); - } - + + const rrr = 'das'; + + function foo () { + const r = 444; + } + + function food () { + const y = 555; + } + const n = new Date().getDay(); - switch(n) { - - case 2: - console.log('haha'); - break; - case 5: - console.log('hahaa'); - break; - - case 6: - console.log('hahadd'); - break; - default: - console.log('kh'); - + + switch (n) { + case 2: + console.log('haha'); + break; + case 5: + console.log('hahaa'); + break; + case 6: + console.log('hahadd'); + break; + default: + console.log('kh'); } - + const arr = [ 1, 2, 3, 45, 6 ]; - + const badawat = async () => { - + const r = 'lol'; + return Promise.resolve(1654984); - }; - + const res = badawat(); + const obj1 = { 'daniel': 'email@outloo' }; - + + const dddd = obj1; + const N = 'Daniel'; console.log(N); + + const d = [ 'daniel', 'was' ]; + const unsort = { + 'apple': 'banan', + 'orange': 'orange', }; - console.log(unsort); + const fo = fobar; + const bademail = 'danieloutlook.com'; - const badphone = '0412331233'; - + + const rw = 'faf'; + + const r = rw; + + const badphone = '04123333'; + const rr = typeof 333; + const tern = fobar.length > 33 ? 'tern' : 'terna'; - + const somefung = () => { - return 4; - }; + + const array = [ 1, 2, 3, 4, 445, 555 ]; + + try { + const r = 34234; + } catch (e) { + console.log(e); + } + + while (array.length > 0) { + array.push(1234); + } + + for ( let index = 0; index < array.length; index++) { + const element = array[index]; + + return element + 44; + } + if (tern.length > 0) { - - console.log(tern); const err = new Error(); + throw 'should ntoi be'; - } - }; - + const nosemi = 'nosemi'; -console.log(nosemi); \ No newline at end of file +console.log(nosemi); + +export {}; \ No newline at end of file