git:
js:
- https://eloquentjavascript.net/
- https://javascript.info/
- https://developer.mozilla.org/en-US/docs/Web/JavaScript
css:
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort(); | |
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort((a, b) => a - b); | |
[10, 2, NaN, " a string", 1.232, true, false, Infinity, 1, -0, 0, -Infinity, {}].sort((a, b) => b - a); |
(draft; work in progress)
See also:
"use strict"; | |
class Graph { | |
#InitialCourses; | |
constructor(edges) { | |
this.E = new Map(); | |
this.V = new Set(); | |
this.I = new Map(); | |
this.#InitialCourses = []; | |
if (edges.length === 0) { | |
return; |
class Graph { | |
constructor(edgesArray) { | |
this.V = new Set(); | |
this.E = {}; | |
if(edgesArray.length === 0) { | |
return this; | |
} | |
edgesArray.forEach(edge => { |
/** | |
* @param {string} num1 | |
* @param {string} num2 | |
* @return {string} | |
*/ | |
var multiply = function(num1, num2) { | |
if(num1 === "0" || num2 === "0") { | |
return "0"; | |
} | |
const numbers = Array.from({length: num2.length}, _ => "0"); |
class Future { | |
#value = null; | |
#error = null; | |
#successCallbacks = []; | |
#failureCallback = () => {} | |
#finalCallback = () => {} | |
constructor(fn) { | |
const onSuccess = (value) => { | |
this.#value = value; |
/** | |
* @param {character[][]} board | |
* @return {boolean} | |
*/ | |
var isValidSudoku = function(board) { | |
toString(board); | |
const len = board.length; | |
let valid = true; | |
for(let i = 0; i < len && valid; i++) { | |
valid = valid && isValidRow(board, i) && isValidColumn(board, i); |