Skip to content

Instantly share code, notes, and snippets.

View szemate's full-sized avatar

Máté Szendrő szemate

  • London / Budapest
View GitHub Profile
@szemate
szemate / api-exercise.md
Last active March 20, 2021 21:20
API exercise
@szemate
szemate / callbacks-exercise.md
Last active March 26, 2022 09:04
Callbacks exercise

Callback function exercise

We are creating a calculator that can do three types of calculation:

  • doubling a number with the double function
  • halving a number with the halve function
  • squaring a number with the square function

Complete the functions so that calculate takes one of the functions that implement an operation and a number as arguments, and returns the result of the calculation.

@szemate
szemate / string-comparison.md
Last active March 17, 2022 17:55
String Comparison Exercise

String Comparison Exercise

In the terminal, run the command node and run the following expressions. What are their outputs? Is there anything you didn't expect?

  • "a" < "b"
  • "A" < "B"
  • "a" < "B"
  • "Alice" < "Bob"
  • "alice" &lt; "Bob"
@szemate
szemate / functions-exercises.md
Last active July 22, 2022 11:02
Functions exercises

Functions Exercises

Exercise 1

A club has the following members:

First name Last name Year joined
Jon Snow 2000
Arya Stark 2013