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
const promise = new Promise((resolve/* , reject */) => { | |
const wait = setTimeout(() => { | |
clearTimeout(wait); | |
resolve('Promise complete!'); | |
}, 2000); | |
}); |
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
// requires babel w/ babel-preset-es2017 & babel-plugin-transform-runtime | |
// for Object.entries support | |
// .babelrc | |
// { | |
// "plugins": ["transform-runtime"], | |
// "presets": ["es2017"] | |
// } | |
const errors = Object.entries({ | |
email: emailValidation.error, | |
password: passwordValidation.error, |
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
<?php | |
/** | |
* Sudoku Solver | |
* | |
* Usage: php sudoku_solver.php challenge.txt | |
* Sample contents of challenge.txt: | |
* 097600000 | |
* 861000000 | |
* 000080000 | |
* 030000001 |