Skip to content

Instantly share code, notes, and snippets.

View Ingelheim's full-sized avatar

Lukas Ingelheim Ingelheim

View GitHub Profile

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?

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?
  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?
  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?

Exercises

Javascript

  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;

Exercises

Javascript

  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;
  1. What’s the result of executing this code and why.
function test() {
   console.log(a);
   console.log(foo());
   
   var a = 1;
   function foo() {
      return 2;
 }
  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;

ANSWER

name = ‘Arthur’ 
# name is Arthur. This short syntax for an if statement is called ternary operator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
  1. What’s the result of executing this code and why.
function test() {
   console.log(a);
   console.log(foo());
   
   var a = 1;
   function foo() {
      return 2;
 }

Exercises

Javascript

  1. What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;