Skip to content

Instantly share code, notes, and snippets.

View remarcmij's full-sized avatar

Jim Cramer remarcmij

  • Amstelveen, The Netherlands
View GitHub Profile
@remarcmij
remarcmij / debounce.js
Created February 15, 2022 09:37
Plain vanilla JS debounce function
function debounce(fn, time) {
let timeoutId;
return (...args) => {
clearTimeout(timeoutId);
timeoutId = setTimeout(fn, time, ...args);
};
}
function foo(msg) {
console.log(msg);
@remarcmij
remarcmij / hyf-objects.js
Last active December 9, 2021 08:09
Objects & Arrays prep exercise
const modules = [
{ name: 'html-css', displayName: 'HTML/CSS' },
{ name: 'javascript', displayName: 'JavaScript' },
{ name: 'browsers', displayName: 'Browsers' },
{ name: 'using-apis', displayName: 'Using APIs' },
{ name: 'node', displayName: 'Node.js' },
{ name: 'databases', displayName: 'Databases' },
{ name: 'react', displayName: 'React' },
{ name: 'project', displayName: 'Project' },
];
@remarcmij
remarcmij / bookshop.md
Last active October 11, 2018 07:15
Bookshop Exercise

Visit to the Book Store

On Saturday, 29 September 2018, Jim went to visit his favorite book store in Amsterdam: Scheltema, located on Rokin. Scheltema has a great collection of fiction, non-fiction and scientific literature. And, not unimportantly, an extensive collection of books on IT.

After looking around a bit, Jim left the book store with a new set of reading glasses, a book on the Go Programming Language and a history book on the Interbellum in Europe, i.e. the period between the First and Second World War.

The receipt is shown below (prices in Euros).

Receipt

@remarcmij
remarcmij / js2wk3.js
Last active October 9, 2018 22:00
JS2 week 3 homework
console.log('\nStep 4.1');
{
function foo(func) {
func();
}
function bar() {
console.log('Hello, I am bar!');
}