Prompt Engineering

Read through sections of the Prompt Engineering Guide starting with Basics and continuing through Examples. Skim the Generating Code section for anything you may find useful when generating code using ChatGPT.

Using ChatGPT, create a prompt or series of prompts that can produce the following code:

function Store(name, minimumCustomers, maximumCustomers, avgCookiesPerCustomer) {
  this.name = name;
  this.minimumCustomers = minimumCustomers;
  this.maximumCustomers = maximumCustomers;
  this.avgCookiesPerCustomer = avgCookiesPerCustomer;
}

Stretch Goal: Have ChatGPT convert this into an ES6 class and ask it to explain any changes that were made.

Submit the prompts used and the responses provided by ChatGPT.