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
// ************************************************************************************ | |
// https://www.codewars.com/kata/54b724efac3d5402db00065e | |
// In this kata you have to write a simple Morse code decoder. While the Morse code is | |
// now mostly superseded by voice and digital data communication channels, it still has | |
// its use in some applications around the world. | |
// The Morse code encodes every character as a sequence of "dots" and "dashes". | |
// For example, the letter A is coded as ·−, letter Q is coded as −−·−, and digit 1 is | |
// coded as ·−−−−. The Morse code is case-insensitive, traditionally capital letters are | |
// used. When the message is written in Morse code, a single space is used to separate |
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
// ************************************************************************************ | |
// https://www.codewars.com/kata/5822d89270ca28c85c0000f3/javascript | |
// Given a string and an array of index numbers, return the characters of the string | |
// rearranged to be in the order specified by the accompanying array. | |
// Ex: | |
// scramble('abcd', [0,3,1,2]) -> 'acdb' | |
// The string that you will be returning back will have: 'a' at index 0, 'b' at index 3, |
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 contacts = [ | |
{ | |
name: 'Idris Elba', | |
pictureUrl: 'https://image.tmdb.org/t/p/w500/d9NkfCwczP0TjgrjpF94jF67SK8.jpg', | |
popularity: 11.622713, | |
id: '11731993-0604-4bee-80d5-67ad845d0a38' | |
}, | |
{ | |
name: 'Jessica Chastain', | |
pictureUrl: 'https://s3-eu-west-1.amazonaws.com/ih-materials/uploads/upload_13fb5a5c4c481562327cad9f6de1bd00.png', |
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
// How would you get the value of queries and params in the following examples? | |
// PARAMS: | |
// 1: | |
// https://dummyexample.com/albums/123cool4lbum | |
app.get('/albums/:albumId', (req, res) => { | |
console.log( /* your code goes here */) | |
}) |
Your MONGODB_URI should look somewhat like this:
mongodb://heroku_3vf5zhlq:[email protected]:41218/heroku_3vf5zhlq
where this is the pattern:
mongodb://user:pass@host:port/db