Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 1.12 KB

README.md

File metadata and controls

24 lines (15 loc) · 1.12 KB

Intermediate-algo

These algorithms have been realized based on ES6 syntax and on functionnal programming as programming paradigm

Intermediate-algo I

Intermediate Algorithm Scripting: Wherefore art thou

Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching name and value pairs (second argument). Each name and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array.

For example, if the first argument is [{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], and the second argument is { last: "Capulet" }, then you must return the third object from the array (the first argument), because it contains the name and its value, that was passed on as the second argument.

Intermediate-algo II

Intermediate Algorithm Scripting: Spinal Tap CasePassed

Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.

Ressources