Skip to content

Instantly share code, notes, and snippets.

View deepaksinghmudila's full-sized avatar
💭
Focusing,Learning.

Deepak Singh Mudila deepaksinghmudila

💭
Focusing,Learning.
  • Computer Science
  • Uttarakhand,India
View GitHub Profile
@andrewmkhoury
andrewmkhoury / ecma6_notes.md
Last active August 10, 2022 10:37
JavaScript Notes
  • Arrows - => defines function sharing lexical this as function body (unlike subfunctions).
  • Classes - class, extends, constructor,get,set, static are syntactic sugar over prototypes patterns (i.e. proper-interoperable class definitions).
    class SkinnedMesh extends THREE.Mesh {
      constructor(geometry, materials) {
        super(geometry, materials);
    
        this.idMatrix = SkinnedMesh.defaultMatrix();
        this.bones = [];
    

this.boneMatrices = [];

@JoeChapman
JoeChapman / sort-alphanumeric-values.js
Created March 22, 2012 13:45
Sorting alphanumeric values in ascending order with a compare function
var arr = ['z', 564, 12, 785, 'a', 'dc', 'o', 43, 's', 'r'];
arr.sort(function (a, b) {
if (a === b) {
return 0;
}
if (typeof a === typeof b) {
return a < b ? -1 : 1;
}
return typeof a < typeof b ? -1 : 1;