By Keili Rosales
First Javascript exercise. 🙌
Starting from the data provided by the teacher, the main idea of this exercise is to create JavaScript functions, which must comply with a series of rules for their realization:
- Use exclusively imperative functional programming.
- The use of objects is prohibited.
- Documented.
- Separated into functions.
- Writing camelCase.
- Variables and names in English.
let surnames = ['10', 'juan', '@12', null, 'antonioPerezDelCarmen', 'abcdefghtioiasoisdjads', 'Manolo', 'Perez', 'Soledad'];
let excuses = ['OMG?', 'What’s going on?', 'How much is it?', '18', null, undefined, function () { }];
let names2 = ['Jeferson', 'Matilda', 'R@fael', '1van', 'Pep3', 'Loquesea', 'Fel1berto', 'Pepit@', 'D@M', 'Pep3'];- The function generateRandom generates a random excuse with the three given arrays.
- The function letterCounter counts the number of letter repetitions in each array.
- The deleteReplay function deletes the repetitions in an array and returns the array without the repetition.
- The reverseData function inverts all values in the array.
- Run the project using:
node index.js. - And check the applied functions.
- Javascript
I'd love to get your appreciation or report on the code at https://github.com/keikeka/Excuse-Generator
Thank you so much!