You've been given the task of finding the main architect of the Tower of Pisa before he achieves his plans; avoiding all those lame pictures of people pretending to stop it from falling.
You've been attributed the task to find the main architect of the Tower of Pisa before he achieves his plans, avoiding us nowadays all those lame pictures of people pretending to stop it from falling.
You arrive at the architects' chamber, but all you have in front of you is a bunch of unknown people.
You arrive at the architects' chamber to find him, but all you have in front of you is a bunch of unknown people.
Step by step, with the little information you have, gather information and figure out by elimination who he is.
Step by step, gather information and figure out by elimination who he is.
Launch the provided HTML file in the browser to begin your investigation.<br/>
On top of the webpage, each of the four buttons fires a function:
Launch the provided HTML file in the browser to begin your investigation.
- Write the body of the `getArchitects` function, which returns an array containing 2 arrays of HTML elements:
At the top of the webpage, each of the four buttons fires a function:
- the first array contains the architects, all corresponding to a `<a>` tag
- the second array contains all the non-architects people
Complete the body of the following functions. The first three functions return an array containing two arrays of HTML elements:
- Write the body of the `getClassical` function, which returns an array containing 2 arrays of HTML elements:
- `getArchitects`:
- the first array contains the architects belonging to the `classical` class
- 1st array: the architects, all corresponding to a `<a>` tag.
- the second array contains the non-classical architects
- 2nd array: all the non-architects.
- `getClassical`:
- Write the body of the `getActive` function, which returns an array containing 2 arrays of HTML elements:
- 1st array: the architects belonging to the `classical` class.
- 2nd array: the non-classical architects.
- `getActive`:
- the first array contains the classical architects who are `active` in their class
- 1st array: the classical architects who are `active` in their class.
- the second array contains the non-active classical architects
- 2nd array: the non-active classical architects.
The last function is `getBonannoPisano`. It returns an array containing:
- Write the body of the `getBonannoPisano` function, which returns an array containing:
- the HTML element of the architect you're looking for, whose `id` is `BonannoPisano`.
- the HTML element of the architect you're looking for, whose `id` is `BonannoPisano`
- an array containing all the remaining HTML elements of active classical architects.
- an array which contains all the remaining HTML elements of active classical architects
> From now on, don't forget to [**export**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) all the expected functions, so that they can be imported to be tested<br/> > `export const getArchitects = () => {...}`
- ...and bit of CSS that could help with the [`:not` pseudo class](https://developer.mozilla.org/en-US/docs/Web/CSS/:not)
> From now on, don't forget to [**export**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) all the expected functions, so that they can be imported to be tested.
```js
export const getArchitects = () => {...}
```
### Files
### Files
You only need to create & submit the JS file `get-them-all.js`. We're providing you the following files to download. You may test them locally:
You only need to create & submit the JS file `get-them-all.js` ; we're providing you the following files to download (click right and save link) & test locally:
- the HTML file [get-them-all.html](./get-them-all.html) to open in the browser, which includes:
- the HTML file [get-them-all.html](./get-them-all.html) to open in the browser, which includes:
- the JS script running some code, and which will allow you to run your code.
- the JS script running some code, and which will also allow to run yours
- some CSS pre-styled classes: feel free to use those as they are, or modify them.
- some CSS pre-styled classes: feel free to use those as they are, or modify them
- an import of the data.
- the import of the data
- the data file [get-them-all.data.js](./get-them-all.data.js) used to generate content in the HTML.
### Notions
- the data file [get-them-all.data.js](./get-them-all.data.js) used to generate content in the HTML
@ -31,10 +31,9 @@ You only need to create & submit the JS file `where-do-we-go.js`; we're providin
- the data file [where-do-we-go.data.js](./where-do-we-go.data.js) from which you can import `places`
- the data file [where-do-we-go.data.js](./where-do-we-go.data.js) from which you can import `places`
- the CSS file [where-do-we-go.css](./where-do-we-go.css) feel free to use those as they are, or modify them.
- feel free to use the CSS file [where-do-we-go.css](./where-do-we-go.css) as it is or you can also modify it.
- the images to use, in this [compressed folder](https://assets.01-edu.org/where-do-we-go_images.zip) or you can can fetch from the public URL, example `https://public.01-edu.org/subjects/where-do-we-go/where-do-we-go_images/arlit.jpg` [arlit](https://public.01-edu.org/subjects/where-do-we-go/where-do-we-go_images/arlit.jpg)
- you can get the images to be used in this [compressed folder](https://assets.01-edu.org/where-do-we-go_images.zip) or you can get them in the where-do-we-go_images folder from the public URL. Example: `https://public.01-edu.org/subjects/where-do-we-go/where-do-we-go_images/arlit.jpg
### Expected result
### Expected result
You can see an example of the expected result [here](https://youtu.be/BLxNi1WH6_0)
You can see an example of the expected result [here](https://youtu.be/BLxNi1WH6_0)