diff --git a/Test_DOM.md b/Test_DOM.md new file mode 100644 index 0000000..7b798ef --- /dev/null +++ b/Test_DOM.md @@ -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. \ No newline at end of file diff --git a/Test_General.md b/Test_General.md new file mode 100644 index 0000000..7e29e51 --- /dev/null +++ b/Test_General.md @@ -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: + +

Hello

+ +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" + +
stuff
+ +You can add multiple styles like this: + +
stuff
+ +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: + + + +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 `