Tozzigh/excuse_generator_copy

★ 0Forks 0JavaScriptGitHub ↗Compare

README

Excuse Generator

By Keili Rosales

Objective

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.

Functions approach.

Array data
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.

Application

  1. Run the project using: node index.js.
  2. And check the applied functions.

Technologies

  • Javascript

Contributions

I'd love to get your appreciation or report on the code at https://github.com/keikeka/Excuse-Generator

Thank you so much!

Contributors

alesanchezrkeikekahernanjkdnachovz

Issues