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

144
Views
Javascript: invoking just the keyword super in a method

Solely invoking the super keyword in a method throws an error, however when accessing it's properties ex. super.constructor, everything works as expected. Is there a reason or it's just another javascript quirk?

class Foo {
    constructor() {
        this.bar();
    }

    bar() {
        /*
          console.log(super); 
          throws the following SyntaxError:
          Uncaught SyntaxError: invalid use of keyword 'super'
          instead of logging the HomeOjbect's (Foo.prototype) prototype (Object.prototype in this case)
        */
        console.log(super.constructor);
        //here however no problem, it logs Object function
    }
}
new Foo
about 4 years ago · Juan Pablo Isaza
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!