Organise your JavaScript objects in Google Apps Script with the constructor pattern by Douglas Crockford.

Photo by Evan Dvorkin on Unsplash

Factory functions and Apps Script are a good match. Structuring your code in App Script with these factory functions simplifies the process of developing and maintaining code. In this article I provide examples and background information on why I use the pattern.

The background

Apps Script is based on JavaScript 1.6, plus…

Jasper Duizendstra

Freelance Google Cloud Platform Architect, Google Workspace GDE

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store