The response to this challenge should come in the form of links to JSFiddles for 1 and 2, and to a Pastebin for 3.
Using JSFiddle, create a <ul>
element and 4 <li>
children elements, and position them in order to meet the following constraints, without the help of external CSS libraries:
- The 4 children should each be using 20% of the available width
- They should be evenly spread horizontally.
- They should have different height
- They should be vertically aligned with respect to their Y centers.
- If I go and change the height of one of the
<li>
, the alignment should still work.
Bonus: Make the
<li>
element shake vertically using CSS only.
Using JSFiddle still, make a function that uses lo-dash to process a list, such that if given this one as argument:
var people = [
{ name: "Mathieu", age: 29 },
{ name: "Yvon", age: 54 },
{ name: "Chris", age: 49 } // :)
]
would return the string "Yvon and Chris"
(by filtering some elements out based on age
, sorting in descending age and joining names into a single string). In other words, this line should be satisfied:
yourFunction(people) == "Yvon and Chris"
Write a function that takes a number N
and returns N!
(factorial N).
Hint: Since iteration does not exist in Erlang, you'll have to use a recursive strategy.