Skip to content

Instantly share code, notes, and snippets.

@marko-knoebl
marko-knoebl / index.html
Last active March 28, 2023 17:25
fetch demo: exchange rates
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exchange Rates</title>
</head>
<body>
<div class="main">

Mentor review 1 (Melina, Theresa, Viki, Adrian)

Overall

good project structure, correct use of React / mongoDB / express concepts

backend: JSON body parser as middleware

The JSON body parser could just be included for all routes inside of server.js:

chapter 1

  • JavaScript versions
  • arrow functions
  • spread operator (...)
  • ternary operator / conditional operator
  • let, const and var
  • higher-order functions
    • callbacks
  • array methods
@marko-knoebl
marko-knoebl / react-checklist-en.md
Created November 25, 2022 10:20
A checklist for learning React - Fork it and start ticking off topics!

React topics checklist

A checklist for learning React - Fork it and start ticking off topics!

React fundamentals

  • use-cases of React
  • JavaScript basics for React
    • immutability / data management without mutations
  • updating properties of objects

The bold items can appear in practical PA exercises.

You can look up / google / ask anything during the PA.

chapter 1

  • terminal / command line basics
    • basic navigation: pwd, ls, cd
    • special paths: . / .. / ~ / -
    • autocompletion

notizen zu Todo-Anwendung

Task 2: Toggling Todos - by button click

challenges:

  • nicht nur Button-Farbe verändern, sondern div-Farbe
  • Text vom Button ändern
  • Klasse von einem übergeordneten div ändern
  • getElementsByClassName gibt immer ein Array zurück
@marko-knoebl
marko-knoebl / mod-1-topics.md
Last active October 29, 2022 12:51
Mod 1 Topics

chapter 1

  • terminal / command line basics
    • basic navigation: pwd, ls, cd
    • special paths: . / .. / ~ / -
    • autocompletion
    • command history (arrow keys, Ctrl+R)
    • executing programs (e.g. node, git, ...)
    • quitting programs
  • copying / pasting in the terminal

Clean Code

Names

use expressive variable / function names that describe what something is used for

NO:

for (let item of array) {
@marko-knoebl
marko-knoebl / akinator-with-some-functions.js
Created October 11, 2022 18:25
Akinator project where two aspects have been extracted into separate functions
/*
* akinator.js
* Copyright (C) 2022 Martin Užák uzak+git@mailbox.org
*
* Distributed under terms of the MIT license.
*/
"use strict";
const prompt = require("prompt-sync")();

chapter 1

  • terminal / command line basics
    • basic navigation: pwd, ls, cd
    • special paths: . / .. / ~ / -
    • autocompletion
    • command history (arrow keys, Ctrl+R)
    • executing programs (e.g. node, git, ...)
    • quitting programs
  • copying / pasting in the terminal