Building a Simple Web Form to Create Posts Using the Fetch API

Forms are an essential part of any web application, enabling users to input and submit data. In this blog post, we’ll walk through creating a simple HTML form that captures user input and submits it to a server using the fetch API. The example leverages https://jsonplaceholder.typicode.com/posts as a test API endpoint for demonstration. Features of … Read more

How to Create a New Post Using JavaScript and the Fetch API

Sending data to a server is a crucial aspect of modern web applications. Whether you’re submitting a form, saving user preferences, or creating a new resource, the fetch API provides a straightforward way to send data via a POST request. In this blog post, we’ll build a webpage where users can create a new post … 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

London Ontario 2025 Summary of the Presentation: Unleashing the Power of Google Apps Script and Gemini

Meet me at https://gdg.community.dev/events/details/google-gdg-london-presents-google-devfest-2024-london-on-ca/ Devfest in London Jan 25, 11:00 AM – 3:00 PM (EST) Western University, 1151 Richmond St, London, N6A 3K7 This presentation by Laurence Svekis explores the integration of Google Apps Script and Gemini AI to streamline workflows, enhance automation, and unlock new possibilities in Google Workspace. It provides an overview of Apps Script as a … Read more

Test Your Skills – JavaScript Questions how many can you get correct

Functions What is a callback function? A) A function that is passed as an argument to another function.B) A function that returns another function.C) A function that is executed immediately after declaration.D) A function that calls itself. Answer: A) A function that is passed as an argument to another function. Explanation:A callback function is passed … Read more

Intermediate JavaScript Guide

1. Functions in JavaScript 1.1 Callbacks A callback function is a function passed into another function as an argument, to be executed at a later time or in response to an event. This is a fundamental concept in asynchronous JavaScript (e.g., handling responses from fetch calls, setTimeout, event listeners, etc.). <details> <summary>Example of a callback</summary> … 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