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
let cache1 = {}, cache2 = {} | |
const blob = () => { | |
var d = [] | |
for (var i=0; i<10; i++) { | |
d[i] = Math.random() | |
} | |
return d | |
} |
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 = { | |
_propA: 'fish', | |
_propB: `cat${this._propA}` | |
} | |
var B = { | |
_propA: 'fish', | |
_propB: 'cat', | |
get propA() { | |
return this._propA |
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
{ | |
"clientNumber": "061234567890", | |
"name": "John Doe", | |
"birthDate": "1994-06-07T00:00:00.000", | |
"telephoneNumber": "06-22609703" | |
} |
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
{"hello": "world"} |
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> | |
<style type="text/css"> | |
html { | |
width: 100%; | |
height: 100%; | |
margin: 0px; | |
padding: 0px; | |
overflow: hidden; |
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 lastCalledTime; | |
var fps; | |
function requestAnimFrame(t) { | |
if(!lastCalledTime) { | |
lastCalledTime = new Date().getTime(); | |
fps = 0; | |
} else { | |
delta = (t - lastCalledTime)/1000; |
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
// cycle through "myArray" in "dir" (-1 or +1), wrapping around | |
var nextIdx = (currentIdx + dir) % myArray.length; | |
if(nextIdx < 0) nextIdx = myArray.length - 1; |