Google Apps Script
Google Apps Script is a Google-hosted JavaScript runner with a builtin namespace for interacting with Google products.
Getting started
Start from the Apps Script dashboard.
From there you can make a new Apps Script project.
Google Slides
Scripts can be bound to a presentation, but don't necessarily need to be.
A script can create or access an existing presentation.