This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
class Banana { | ||
constructor(goodOrNah) { | ||
this.quality = goodOrNah; | ||
} | ||
|
||
eat() { | ||
// omnomomnomom | ||
const om = 'om\nnom'; | ||
} | ||
|
||
static peelTime(length) { | ||
const magicNumber = 123; | ||
return length * magicNumber; | ||
class Class { | ||
constructor() {} | ||
static staticMethod() { | ||
this.something; | ||
} | ||
} | ||
const c = new Class(); | ||
c.staticMethod(); | ||
|
||
const banana = new Banana(10); | ||
banana.eat(); | ||
console.log(Banana.peelTime(100)); | ||
function func(param) { | ||
return; | ||
} | ||
func(); | ||
|
||
const tl = `Blah blah ${blah} ${blah()} ${blah[0]} blah`; | ||
const num = 123; | ||
let string = 'string'; | ||
|
||
function makeBanana(num) {} | ||
// comment | ||
|
||
for (let i = 0; i < 10; i++) { | ||
makeBanana(); | ||
} | ||
for (const thing of stuff) {} | ||
for (let thing in stuff) {} | ||
console.log(); | ||
|
||
const regex = /banana/; | ||
const regexdos = /[.*+?^${}()|[\]\\]/g; | ||
const obj = { | ||
a: 1, | ||
b: '2', | ||
c: true | ||
}; | ||
|
||
if (true) {} | ||
while (true) {} | ||
if (something) { | ||
} else if (somethingElse) { | ||
} else { | ||
} | ||
|
||
switch (fruit) { | ||
case 'banana': | ||
switch (thing) { | ||
case 'blah': | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
const asyncFetchBananas = async () => { | ||
let bananas = await findBananas(); | ||
const template = `${obj.b} abcdefghijk ${elemeno} pqrstuvwxyz ${func()}`; | ||
|
||
for (let i = 0; i < 10; i++) {} | ||
for (const thing of stuff) { | ||
} | ||
for (const thing in stuff) { | ||
} | ||
while (false) {} | ||
|
||
const regex = /^abc|def[A-Z]$/gim; | ||
|
||
const specialBanana = new Banana(11); | ||
bananas.push(specialBanana); | ||
} | ||
const asyncFunc = async () => { | ||
await operation(); | ||
}; |