-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 58b0bc5
Showing
4 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Build a small webpage **without the use of jQuery** that does the following: | ||
|
||
1. Fetches data from https://jsonplaceholder.typicode.com/posts | ||
2. Displays the post in a friendly format (doesn't have to use fancy CSS, but should be legible) | ||
3. Has the ability to filter posts by `userId` or `id` of the post. | ||
|
||
You are free to use any online resources you want, and if you copy any code, please cite where you sourced it from. | ||
|
||
Please put a repository to this code on Github. It would be ideal if you could also put this onto a `gh-pages` branch, but that is not necessary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Washington iGEM Web Developer Recruitment General Test | ||
|
||
``` | ||
If you do not know HTML: | ||
Generally, you can have HTML elements inside each other, like this: | ||
<div> <h1> Hello </h1> </div> | ||
This would be a `h1` header tag inside a `div` tag. | ||
You can add styles to tags like the following (without using external CSS). | ||
The following will add a solid black border that is 1px wide around the content, | ||
which is "stuff" | ||
<div style="border: 1px solid black"> stuff </div> | ||
You can add multiple styles like this: | ||
<div style="border: 1px solid black; color: green"> stuff </div> | ||
This does the same as above, except makes the text color green. | ||
=== | ||
HTML tags are usually in the body of a page. The body of a page is denoted | ||
with body tags: | ||
<body></body> | ||
You can use languages like JavaScript to insert elements into tags | ||
you can find on the page. Later in my language below, there will be a | ||
method of doing that. | ||
``` | ||
|
||
## Fictional language | ||
|
||
Below, I have written code with a syntax I just made up. Try | ||
to reason through what it is doing and determine the output. | ||
This is meant to test your reasoning skills. Don't worry if | ||
you cannot solve the problem! | ||
|
||
One thing to note: `>>` prints a statement on a new line in | ||
this fictional language, and `start[]` is the entrypoint to | ||
this program. | ||
|
||
### 1.1 | ||
|
||
``` | ||
addTwo[a number] number { | ||
var outputVal number = a + 2 | ||
output[outputVal] | ||
} | ||
start[] { | ||
>> addTwo[3] | ||
>> "I like React" | ||
>> addTwo[5] | ||
} | ||
``` | ||
|
||
What does this print out when it has finished? Your answer | ||
should look exactly like the expected console output. Enter | ||
your solution in the code block | ||
|
||
``` | ||
``` | ||
|
||
### 1.2 | ||
|
||
``` | ||
const strings Strings = lib[strings] | ||
doAnotherThing[a number] string { | ||
var outputValue string = strings^NumToString[a] | ||
outputValue = strings^Concatenate[outputValue, " people"] | ||
output[outputValue] | ||
} | ||
doSomething[a number, b func] { | ||
var passNumber number = a + 1 | ||
var outputValue string = b[passNumber] | ||
output[outputValue] | ||
} | ||
start[] { | ||
>> doSomething[3, doAnotherThing] | ||
} | ||
``` | ||
|
||
What does this print out when it has finished? | ||
|
||
``` | ||
``` | ||
|
||
### 1.3 | ||
|
||
``` | ||
const htmlDOM HtmlDOM = lib[htmlDOM] | ||
start[] { | ||
var body HtmlDOM^BodyEl = htmlDOM^GetTagInDOM["body"] | ||
var div HtmlDOM^DivEl = htmlDOM^Create["div"] | ||
div^SetStyle["background-color", "red"] | ||
div^SetClass["test"] | ||
div^SetID["igem"] | ||
div^SetInnerText["this is text"] | ||
htmlDOM^InsertIn[body, div] | ||
} | ||
``` | ||
|
||
Complete the HTML without using `<style>` tags | ||
``` | ||
<body> | ||
</body> | ||
``` | ||
|
||
### 1.4 | ||
|
||
Write code using this made up syntax (as best as you can) to | ||
create a `<div>` with class `container`, with two `<div>` | ||
elements inside it each with a class `inner`. One of those | ||
`inner` `<div>` elements should have just the text `A` inside | ||
it, and one should have `B` inside it. Rather than repeat code, | ||
try to create a reusable function. Once you have created this `div`, | ||
enter it into the `body` tag. | ||
|
||
I've started it off for you. | ||
|
||
``` | ||
const htmlDOM HtmlDOM = lib[htmlDOM] | ||
customDivEl[insideString string] HtmlDOM^DivEl { | ||
output[ ] | ||
} | ||
start[] { | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Build a React application that does the following: | ||
|
||
1. Fetches data from https://jsonplaceholder.typicode.com/posts | ||
2. Displays the post in a friendly format (doesn't have to use fancy CSS, but should be legible) | ||
3. Has the ability to filter posts by `userId` or `id` of the post. | ||
|
||
You are free to use any online resources you want, and if you copy any code, please cite where you sourced it from. You are free to use any libraries you want for this application, though it is not necessary. Be sure you take a look at what I suggest you look into to have hints of what I am sorta looking for! | ||
|
||
Please put a repository to this code on Github. It would be ideal if you could build and compile this application to a `gh-pages` branch, but that is just a bonus. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Build a small webpage that does the following: | ||
|
||
1. Fetches data from https://jsonplaceholder.typicode.com/posts | ||
2. Displays the post in a friendly format (doesn't have to use fancy CSS, but should be legible) | ||
3. Has the ability to filter posts by `userId` or `id` of the post. | ||
|
||
You are free to use any online resources you want, and if you copy any code, please cite where you sourced it from. | ||
|
||
Please put a repository to this code on Github. It would be ideal if you could also put this onto a `gh-pages` branch. |