Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
How to differentiate between class get set and constructor attributes

What is the hidden field(argument1), I'm getting in chrome console?

class ClassName {
  constructor(argument1) {
    this._argument1 = argument1;
  }

  get argument1() {
    return this._argument1 + " by get method.";
  }

  set argument1(value) {
    if (value.length < 4) {
      console.log("Please provide name with more length.");
      return;
    }
    this._argument1 = value;
  }
}

let object1 = new ClassName("abcde");
console.info(object1);

chrome-console-output

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this is your getter - get argument1()
see the tooltip before you expand the field:
Invoke property "getter"

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!