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 RomanNumerals = { | |
toRoman : function (number) { | |
var ret = ''; | |
while(number > 0) { | |
if(number/1000 >= 1) { | |
ret += 'M'; | |
number -=1000; | |
} else if(number/900 >= 1) { | |
ret += 'CM'; | |
number -=900; |
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
const https = require('https'); | |
const fetch = (url) => { | |
return new Promise((resolve, reject) => { | |
https | |
.get(url, (resp) => { | |
let data = ''; | |
// A chunk of data has been recieved. | |
resp.on('data', (chunk) => { |
Sign up to Heroku.
Then install the Heroku Toolbelt. It is a command line tool to manage your Heroku apps
After installing the Heroku Toolbelt, open a terminal and login to your account:
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> | |
</head> | |
<body> | |
<div class="container"> | |
<!-- Topic --> | |
<div class="topic"> | |
<h1>Isomorphic</h1> |
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
/* | |
JavaScript | |
Write a mySort function which takes in an array integers, and should return an array of the inputed integers sorted such that the odd numbers come first and even numbers come last. | |
For exampl1e: | |
mySort( [90, 45, 66, 'bye', 100.5] ) | |
should return | |
[45, 66, 90, 100] |