JAVASCRIPT CODE THAT IS SELDOM USED/HARD TO REMEMBER. SEE ALSO HTML.txt JMOL: unchangedScriptToJmol(spt) = runBareSpt(spt); count of residues found {[ALA] and selected}.groupindex.pivot.keys.count ------------- typeof X (Jmol: x.type) array: object. substr(start, length) substring(start, [stop_index]) // does not include stop character x = x.replace(/mn/ig, "xy"); // join arrays array3 = array1.concat(array2) must be assigned! array.sort() no need to assign. JSON.stringify() used in jcontrol.js alphanummeric sort jcontrol.js // Alphanumeric sort. Code from: // https://stackoverflow.com/questions/4340227/sort-mixed-alpha-numeric-array findChainList.sort(new Intl.Collator('en',{numeric:true, sensitivity:'accent'}). sensitivity can be "case" but still sorts ..J1,j1,K1,k1,...