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
name: search() not working as expected | |
description: Creates a new snippet from a blank template. | |
host: WORD | |
api_set: {} | |
script: | |
content: > | |
document.getElementById("run").addEventListener("click", () => | |
tryCatch(run)); | |
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
name: Content control is unbound unexpectedly | |
description: Creates a new snippet from a blank template. | |
host: WORD | |
api_set: {} | |
script: | |
content: > | |
document.getElementById("run").addEventListener("click", () => | |
tryCatch(run)); | |
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
name: Slow clean up demo | |
description: Creates a new snippet from a blank template. | |
host: WORD | |
api_set: {} | |
script: | |
content: > | |
document.getElementById("run").addEventListener("click", () => | |
tryCatch(run)); | |
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
env: | |
browser: true | |
extends: 'eslint:recommended' | |
rules: | |
indent: | |
- error | |
- 2 | |
- { "SwitchCase": 1, "VariableDeclarator": { "var": 2, "let": 2, "const": 3 }} | |
linebreak-style: | |
- 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
var strArr = ['ab', 'bc', '12', 'ac']; | |
strArr.sort(function (a, b) { | |
// You used to write code like: | |
// | |
// if (a > b) { return 1; } | |
// else if (a < b) { return -1; } | |
// else { return 0; } | |
// | |
// But in fact, you just need do this! | |