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
/* | |
* Important! | |
* This snippet is deprecated, a best implementation of sortBy can be found here: | |
* https://github.com/jherax/array-sort-by | |
*/ | |
var sortBy = (function () { | |
var toString = Object.prototype.toString, | |
// default parser function | |
parse = function (x) { return x; }, |
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
//definimos el constructor del objeto base y | |
//establecemos las propiedades por instancia | |
function Person (name, age) { | |
"use strict"; | |
this.name = name || "unnamed"; | |
this.age = +age || 0; | |
} | |
//definimos el prototipo del objeto base | |
//estableciendo las propiedades compartidas |
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
VALOR COERCIÓN | |
------- --------- | |
false false | |
0 false | |
“” false | |
NaN false | |
null false | |
undefined false |
NewerOlder