Skip to content

Instantly share code, notes, and snippets.

@kruczy
Last active August 29, 2015 14:04
Show Gist options
  • Save kruczy/d422b7bae37049a6ba82 to your computer and use it in GitHub Desktop.
Save kruczy/d422b7bae37049a6ba82 to your computer and use it in GitHub Desktop.
Test
function foo(){
bar()
function bar(){
console.log('bar1')
}
}
function bar(){
console.log('bar2')
}
foo()
function Foo(){
this.bar = 2;
}
Foo.prototype.bar = 1;
var f = new Foo();
console.log(f.bar);
function Foo(){
this.bar = 2;
}
Foo.prototype.bar = 1;
var f = new Foo();
delete f.bar;
console.log(f.bar);
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);
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