Skip to content

Instantly share code, notes, and snippets.

@Segmentational
Created November 26, 2021 02:36
Show Gist options
  • Select an option

  • Save Segmentational/bd2ce672ee8507a59cbdfdce31a2813a to your computer and use it in GitHub Desktop.

Select an option

Save Segmentational/bd2ce672ee8507a59cbdfdce31a2813a to your computer and use it in GitHub Desktop.
Object Getters and Setters
import { Settings } from "./settings.js";
export const Test = {
get example() {
return Settings.attribute;
},
set example(value) {
Settings.attribute = value;
},
get settings() {
return Settings;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment