This file contains 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
for (const i of [1, 2, 3, 4]) { | |
if (i === 3) break; | |
log(i); | |
} | |
abc: { | |
log('a'); | |
if (location.href.includes('.com')) break abc; | |
log('b'); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
.test { | |
width: 100px; height: 100px;background: red; | |
} | |
@keyframes spin{ | |
to{transform:rotateY(360deg) rotateZ(360deg) rotateX(720deg)} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
@keyframes spin{ | |
to{transform:rotateX(360deg);} | |
} | |
html, body{height: 100%;} | |
body{perspective:800px;background:#404040} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
@keyframes origin{ | |
0%{perspective-origin:0% 50%} | |
50%{perspective-origin:100% 50%} | |
100%{perspective-origin:0% 50%} | |
} |
This file contains 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 a = { valueOf() { return null; }, toString() { return null; }}; | |
a + 1 === 1 |
This file contains 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
a.call === Function.prototype.call |
This file contains 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 a = function(a) { console.log(this.a); return a; }; | |
console.log(a.apply.call(a, { a: 'b' }, ['c'])); | |
console.log(a.call.apply(a, [{ a: 'd' }, 'e'])); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
@keyframes ani { | |
from { width: 0; } | |
to { width: 100%; } | |
} | |
</style> |
This file contains 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
<html><head></head><body> | |
<section id="todo"></section> | |
<script> | |
const TaskState = class { | |
static addState(key, cls) { | |
const v = new cls(); | |
if (!(v instanceof TaskState)) throw 'invalid cls'; | |
if ((TaskState._subClasses || (TaskState._subClasses = new Map())).has(key)) throw 'exist key'; | |
TaskState._subClasses.set(key, cls); | |
} |
This file contains 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
<html><head></head><body> | |
<section id="todo"></section> | |
<script> | |
const TaskState = class { | |
static addState(key, cls) { | |
const v = new cls(); | |
if (!(v instanceof TaskState)) throw 'invalid cls'; | |
if ((TaskState._subClasses || (TaskState._subClasses = new Map())).has(key)) throw 'exist key'; | |
TaskState._subClasses.set(key, cls); | |
} |
NewerOlder