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 https = require('https') | |
const HOST = ""; | |
const PATH = "" | |
const TOKEN = "" | |
const RATE_LMIT = 10; | |
const RATE_INTERVAL = 1000; //ms | |
const post = (phone, code) => new Promise((resolve, reject) => { |
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
('b' + 'a' + + 'a' + 'a').toLowerCase(); // should print "banana" | |
('' + + ''); // should print "0" |
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
/********* | |
1 | |
*********/ | |
var a = 12; | |
var superFunction = function () { | |
console.log(a); | |
var a = 80; | |
}; | |
superFunction (); |
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
// Really cool conferences here: | |
// https://www.youtube.com/watch?v=8aGhZQkoFbQ | |
// https://www.youtube.com/watch?v=cCOL7MC4Pl0 | |
/********* | |
1 | |
*********/ | |
for ( var i = 0; i < 3; i++) { | |
setTimeout( function() { console.log(i); }, i * 1000 ); | |
} |
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
//example data | |
db.venues.insert( { | |
name: "Central Park", | |
location: { type: "Point", coordinates: [ -73.97, 40.77 ] }, | |
category: "Parks" | |
} ); | |
db.venues.insert( { | |
name: "Sara D. Roosevelt Park", | |
location: { type: "Point", coordinates: [ -73.9928, 40.7193 ] }, | |
category: "Parks" |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
#clockdiv{ | |
width: 100%; | |
font-family: sans-serif; | |
display: inline-block; |
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
function flip() { | |
return Math.random() >= 0.5; | |
} | |
function randomNumber(n) { | |
if(n === undefined) throw new Error("n is required"); | |
if(n <= 0) throw new Error("n must be greater than 0"); | |
if(n > 1000000) throw new Error("n must be lower than 1,000,000"); | |
// No need to further calculations |