Skip to content

Instantly share code, notes, and snippets.

@Ingelheim
Created August 21, 2016 10:54
Show Gist options
  • Save Ingelheim/0e5e471bc718a684d7d9def4629507a4 to your computer and use it in GitHub Desktop.
Save Ingelheim/0e5e471bc718a684d7d9def4629507a4 to your computer and use it in GitHub Desktop.

Test 1

  1. Which HTML 5 tag would you use for semantically correctly wrap your page navigation?
  2. What is the difference between a <div> and a <span> in HTML?
  3. What is wrong in the following HTML?
<div class="some class" id="someID"></div>
<div class="some class" id="someID"></div>
  1. How would you create a new folder named testFolder with the command line?
  2. How would you enter this folder?
  3. Given you are now in this folder, how would you check if git has already been initialized in that folder?
  4. If git has not yet been added to that folder, how would you add it?
  5. Which industry vertical are you interested in and why?
  6. Using Javascript, please write a function foo, that takes two arguments, an array and a number, and returns true if the length of the array is equal to the second argument? E.g. foo([1, 2, 3], 3) would return true.
  7. Write a loop in Javascript, iterating over the array [1, 2, 3, 4] printing out if the element is eiter the first element (print first - ), the last element (print last) or neither first or last element (print not first or last -). E.g. the expected output would be (first - not first or last - not first or last - last)
  8. Print all numbers from 15 - 0 do the command line using a for loop in JS.
  9. What would the console print in following example
function outer(input) {
  var a = inout;
  
  function inner(multiplier) {
    console.log(a * multiplier);
  }
  
  return inner;
}

var firstResult = outer(9);
firstResult(10);
  1. Add the missing code to print "this is A" to the console by accessing the key from the JS object literal.
var someObject = {b : "some test", a : "this is A"}
console.log("*Youre code here*");

Test 2

  1. Which HTML 5 tag would you use for semantically correctly wrap your page footer?
  2. What is the difference between a class and an id in HTML and what is it used for?
  3. What is wrong in the following HTML?
<div class="some-class">
<div class="some-class" id="someID"></div>
  1. How would you create a new file named testFile with the command line?
  2. How would you remove this file with the command line?
  3. Given you are in a folder that has git and a remote branch on github. How would you get the most current version on your machine?
  4. Which industry vertical are you interested in and why?
  5. Using Javascript, please write a function testFunc, that takes two arguments, an array and a number, and returns a new array where each element has been multiplied with the second number? E.g. testFunc([1, 2, 3], 2) would return [2, 4, 6].
  6. Print all numbers from -10 up until 10 to the command line using a for loop in JS.
  7. What would the console print in following example
function outer() {
  var x = 5;
  
  function inner(multiplier) {
    console.log(multiplier - x);
  }
  
  return inner;
}

var firstResult = outer();
firstResult(10);
  1. What will be output to the terminal?
var someObject = {b : "some test", a : "this is A", c : function(input){ return input * 6;}}
console.log(someObject.c(6));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment