Skip to content

Instantly share code, notes, and snippets.

@samikeijonen
samikeijonen / fetch-rest-api.js
Last active April 30, 2021 10:47
Using Fetch API and REST API
/*
* Load contacts and filter by categories.
*/
( function() {
'use strict';
// Variables.
const filterForm = document.getElementById( 'filter-contacts' );
const contactWrapper = document.getElementById( 'contact-section' );
const htmlOutput = document.getElementById( 'js-contact-replace' );