What is the role of get before a function?

Asked

Viewed 20 times

0

I am a beginner in the Back-end, and I am in doubt in a code that was listed in the class, I would like to know what the get before function id()

const sequence = {
    _id: 1,
    get id(){return this._id++}
}
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.