This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('.material-card > .mc-btn-action').click(function () { | |
var card = $(this).parent('.material-card'); | |
var icon = $(this).children('i'); | |
icon.addClass('fa-spin-fast'); | |
if (card.hasClass('mc-active')) { | |
card.removeClass('mc-active'); | |
window.setTimeout(function() { | |
icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://apipheny.io/free-api/ | |
const fetch = require("node-fetch"); | |
const text = fetch("https://catfact.ninja/fact") | |
.then((res) => res.json()) | |
.then((json) => { | |
const text = json.fact; | |
console.log(text + "\n"); |