-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathindex.js
42 lines (37 loc) · 1.43 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const morseCodeDictionary = require("./morse-code-dictionary.json");
/**
* Returns an array of all of the words sorted by length, shortest first
* @param {String[]} words - An array of strings.
* @returns {string[]} An array of strings.
*/
function sortByStringLength() {}
/**
* Returns an array of the word in all scrolling positions.
* @param {String} word - A string.
* @returns {string[]} An array of strings
* Example: "Hello"
* [ 'elloH', 'lloHe', 'loHel', 'oHell', 'Hello' ]
*/
function textScroller() {}
/**
* Returns the difference between the largest and smallest number in the array
* @param {Number[]} numbers - An array of numbers.
* @returns {Number} The difference between the largest and smallest number.
*/
function betweenExtremes() {}
/**
* Returns the translation of English to morse code.
* @param {String} message - A string to translate.
* @param {Object[]} dictionary - A morse code dictionary (one is imported at the top of the file, use it if you want to test your code in this file)
* @returns {Number} The message in morse code. Note that the tests do not want you to separate words with slashes, like in the example below.
* Example: "A new month"
* .- / -. . .-- / -- --- -. - ....
* Hint: Check the morse-code-dictionary.json file to see what data is available.
*/
function morseCodeTranslator() {}
module.exports = {
sortByStringLength,
textScroller,
betweenExtremes,
morseCodeTranslator,
};