Introduction to the JavaScript Fetch API: A Beginner’s Guide

he Fetch API is an essential tool in modern JavaScript for making HTTP requests, replacing the older XMLHttpRequest method with a more modern and flexible promise-based approach. Whether you’re a complete beginner or someone looking to polish your skills, learning how to use the Fetch API is a great way to enhance your web development … Read more

Automating Google Docs: Adjusting Heading Levels with Apps Script

Google Docs provides a powerful platform for creating and organizing documents, but managing heading levels across a document can sometimes become tedious. If you’ve ever wanted to automatically adjust headings to one level lower throughout a document, you’re in luck! The updateHeadingLevels script simplifies this process, ensuring all headings are updated correctly while preserving formatting. … Read more

Automate Course Code Matching in Google Sheets with Google Apps Script

Google Apps Script is a versatile tool that can simplify repetitive tasks in Google Sheets. In this post, we’ll explore a script that automates the process of matching course codes from multiple sheets and adding them as additional columns in a main sheet. This solution is perfect for managing large datasets where matching values across … Read more

Creating a Filtered Sheet in Google Sheets with Google Apps Script

Google Apps Script is a powerful tool that lets you automate tasks and enhance the functionality of your Google Sheets. In this post, we’ll walk you through how to create a script that filters data from a sheet named main and copies rows with non-empty values in columns A, B, and C into a new … Read more

How to Fetch and Display API Data on Your Website

Fetching data from an API and displaying it on a webpage is a foundational skill for any web developer. In this blog post, we’ll guide you through a simple example of fetching data from a REST API and dynamically outputting it on your webpage using JavaScript. This example covers: Let’s dive into the implementation! The … Read more

How to Fetch and Display a Random Dog Image on Your Website

In this tutorial, we’ll walk through a simple yet fun project: building a webpage that fetches and displays a random dog image using the Dog CEO API. Whether you’re new to JavaScript or looking for a practical example of using the fetch() API to interact with a third-party service, this post has something for everyone. … Read more

Organizing Your Google Docs with Apps Script: A Guide to Sorting Sections by Headings

When working on large Google Docs, organizing content systematically can be daunting, especially if you’re dealing with sections categorized under specific headings. This is where Google Apps Script comes to the rescue! In this blog post, we’ll explore a function, reorganizeDocByHeading2, that reorganizes the content of a Google Doc based on predefined categories under “Heading … Read more

Apps Script that counts the number of Heading 4 elements in a Google Doc

Apps Script Code function countHeading4InDocument() { const DOCID = ‘YOUR_DOCUMENT_ID_HERE’; // Replace with your Document ID const doc = DocumentApp.openById(DOCID); const body = doc.getBody(); const paragraphs = body.getParagraphs(); let heading4Count = 0; // Iterate through all paragraphs for (let i = 0; i < paragraphs.length; i++) { const paragraph = paragraphs[i]; if (paragraph.getHeading() === DocumentApp.ParagraphHeading.HEADING4) … Read more

Apps Script that adds a blank line above every occurrence of the word

Apps Script Code function addBlankLineAndBoldExplanation() { const DOCID = ‘YOUR_DOCUMENT_ID_HERE’; // Replace with your Document ID const doc = DocumentApp.openById(DOCID); const body = doc.getBody(); const paragraphs = body.getParagraphs(); // Iterate through all paragraphs in the document for (let i = 0; i < paragraphs.length; i++) { const paragraph = paragraphs[i]; const text = paragraph.getText().trim(); // … Read more

Apps Script code that adds a horizontal line above each Heading 4

Apps Script Code function addHorizontalLineAboveHeading4() { const DOCID = ‘YOUR_DOCUMENT_ID_HERE’; // Replace with your Document ID const doc = DocumentApp.openById(DOCID); const body = doc.getBody(); const paragraphs = body.getParagraphs(); // Iterate through the paragraphs in reverse order for (let i = paragraphs.length – 1; i >= 0; i–) { const paragraph = paragraphs[i]; // Check if … Read more