Client Side Code creation and Apps Script to get Sheet data to web app Client Side JavaScript

Instead of making an additional fetch request from the client-side to get the data, you will pass the data directly when the HTML page is initially served. Here’s how you can achieve this: Google Apps Script: Server-Side You’ll modify the doGet function to use an HTML template that includes the data. This allows the server … Read more

Apps Script Sheets to API endpoint webapp

To create a web application using Google Apps Script that outputs the contents of a Google Spreadsheet into a client-side JavaScript object, you’ll need to write code for both the server-side (Google Apps Script) and the client-side (HTML with embedded JavaScript). Here’s how you can set it up: 1. Google Apps Script: Server-Side First, you’ll … Read more

Mastering CSS – From Text Styling to Flexbox Layouts

Diving into the world of web development brings its own set of challenges and opportunities, particularly in the realm of CSS. This post explores three key areas of CSS that every budding web developer must understand: text styling, Flexbox layouts, and link pseudo-classes. Each segment includes code snippets, explanations, and practical applications to help you … Read more

Using Catch in JavaScript

In JavaScript, error handling is commonly done using the try…catch statement. The try block lets you test a block of code for errors, while the catch block lets you handle the error. Here are a few examples that demonstrate how to use catch to handle errors in different scenarios: 1. Basic try…catch try { // … Read more

How to Load, Draw on, and Save Images with HTML Canvas

In this tutorial, we’ll explore how to build a web application that allows users to load an image into an HTML canvas, draw on it, and then save their masterpiece. This feature is perfect for applications that require user interaction on images, such as photo editing tools, signature apps, and more. What You Will Need … Read more

How to Convert H4 Elements to Bold Text in Google Docs with Apps Script

You can achieve this task using Google Apps Script, which allows you to automate actions within Google Docs. The script below selects all H4 elements in a Google Doc and converts them to regular text that is bolded. This is done by finding all the text elements formatted as Heading 4, changing their attributes to … Read more

Understanding Control Structures: The Backbone of Programming

In the world of programming, control structures serve as the fundamental building blocks that dictate the flow and logic of a program. Whether you’re a beginner or an experienced coder, mastering control structures is essential for writing efficient and error-free code. Let’s delve deeper into what control structures are, how they work, and why they … Read more

JavaScript Asynchronous JavaScript

🕒 Unraveling Asynchronous JavaScript: Dive Into Promises, Async/Await, and Beyond! 🕒 Asynchronous JavaScript is the cornerstone of modern web development, enabling complex operations like data fetching, timer-based actions, and parallel processing without blocking the main thread. To boost our collective journey into this crucial JavaScript feature, I’ve crafted a series of exercises: – Grasp the … Read more

Apps Script to Generate a table of contents in Docs

Creating a Table of Contents (ToC) in a Google Docs document using Google Apps Script, focusing only on Heading 1 styles, is a straightforward task. Below is a script that does exactly that. It scans through your document, identifies all the text that has been styled as Heading 1, and then generates a ToC at … Read more

Basic Arithmetic Operations

Basic Arithmetic Operations Image: Output of Basic Arithmetic Operations into the console Objective: To familiarize the student with basic arithmetic operations in JavaScript and the usage of variables. Topics Covered: Code: // Objective: Perform arithmetic operations and store their results in variables. // 1. Declare two variables, a and b, and assign them values of … Read more