-
-
Save kruczy/d422b7bae37049a6ba82 to your computer and use it in GitHub Desktop.
Test
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 foo(){ | |
| bar() | |
| function bar(){ | |
| console.log('bar1') | |
| } | |
| } | |
| function bar(){ | |
| console.log('bar2') | |
| } | |
| foo() |
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 Foo(){ | |
| this.bar = 2; | |
| } | |
| Foo.prototype.bar = 1; | |
| var f = new Foo(); | |
| console.log(f.bar); |
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 Foo(){ | |
| this.bar = 2; | |
| } | |
| Foo.prototype.bar = 1; | |
| var f = new Foo(); | |
| delete f.bar; | |
| console.log(f.bar); |
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 Foo(){ | |
| this.bar.baz++; | |
| } | |
| Foo.prototype.bar = { | |
| baz: 10 | |
| }; | |
| new Foo(); | |
| new Foo(); | |
| new Foo(); | |
| var f = new Foo(); | |
| console.log(f.bar.baz); |
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
| var a = [3, 123, 12, 45, 78, 12, 90, 45, 33, 82, 65, 35, 72, 19, 12, 16, 72, 39, 77, 44, 22, 11, 99]; | |
| a.sort(function(a, b){ | |
| return a > b; | |
| }); | |
| console.log(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment