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
// ================================================================= | |
// require all necessary packages ================================= | |
// ================================================================= | |
const express = require('express'); | |
const cors = require('cors'); | |
const app = express(); | |
const jwt = require('jsonwebtoken'); | |
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
{ | |
"short_name": "FakeNews", | |
"name": "Fake News - Your #2 Source for Fake News", | |
"icons": [ | |
{ | |
"src": "img/logo-48x48.png", | |
"type": "image/png", | |
"sizes": "48x48" | |
}, | |
{ |
Extend the native Array data type to allow a groupBy
method so that when given an array of objects, you can group each array item by a specified property.
For example, given an array of Turing students:
let students = [
{ name: "Louisa", module: "4FE", track: "frontEnd" },
{ name: "Nathaniel", module: "3FE", track: "frontEnd" },
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
// ================================================================= | |
// require all necessary packages ================================== | |
// ================================================================= | |
const express = require('express'); | |
const app = express(); | |
const bodyParser = require('body-parser'); | |
const jwt = require('jsonwebtoken'); | |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Firebase Google Auth</title> | |
<style type="text/css">body,button,html{text-align:center}body,html{margin:50px;font-family:'Helvetica Neue'}button{border:0;background-color:pink;text-transform:uppercase;color:#fff;padding:15px 30px;margin:0 auto}#accountDetails{font-family:'Courier New';border:1px solid #eee;padding:20px;margin:20px auto;overflow-wrap:break-word}</style> | |
</head> | |
<body> | |
<button id="signIn">Sign In</button> | |
<div id="accountDetails"></div> |
Read about Pascal's Triangle here
Write a function that, given a depth (n), returns an array representing Pascal's Triangle to the n-th level.
For example:
pascalsTriangle(4) #=> [1, 1, 1, 1, 2, 1, 1, 3, 3, 1];
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
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended" | |
], | |
"plugins": [ | |
"react" | |
], | |
"env": { |
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
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended" | |
], | |
"plugins": [ | |
"react" | |
], | |
"env": { |