About 196,000 results
Open links in new tab
  1. oop - Class Variables in Javascript - Stack Overflow

    Nov 25, 2014 · Class Variables in Javascript. Ask Question Asked 16 years, 6 months ago. Modified 10 years, 5 months ago. ...

  2. syntax - class variable in Javascript - Stack Overflow

    Jun 18, 2016 · 3 ways to define a variables to JavaScript class: 1)To define properties created using function(), you use the 'this' keyword. function Apple (type) { this.type = type; this.color = …

  3. javascript - ES6 class variable alternatives - Stack Overflow

    Mar 20, 2014 · Currently in ES5 many of us are using the following pattern in frameworks to create classes and class variables, which is comfy: // ES 5 FrameWork.Class({ variable: …

  4. javascript - variable and function declaration in classes in ES6 ...

    Dec 24, 2017 · When using ES6 class, you can't declare a variable using var, let or const but you can define instance variables and static variables. The basic difference been that instance …

  5. class - Instance Variables in Javascript Classes - Stack Overflow

    Nov 17, 2016 · I was poking around, trying to figure out how to use instance variables in JavaScript classes using the syntax below. I've tried declaring the instance variables by …

  6. JavaScript Classes and Variable Scope - Stack Overflow

    May 7, 2025 · Each instance of your class will have a member 'd' with the value 4 initially. Note however that assigning a reference type object to a prototype member of your class (such as …

  7. Static variables in JavaScript - Stack Overflow

    Oct 8, 2009 · The simplest solution I found: don't define a static variable in the class at all. When you want to use a static variable, just define it there and then, e.g. someFunc = => { …

  8. javascript - Access Class Variable - Stack Overflow

    Mar 12, 2018 · in this class assign data in constructor or setData Method but I want to access those data by directly without this.data.variableName. and I want to get only those data, not …

  9. javascript - Declaring static constants in ES6 classes? - Stack …

    Sep 18, 2015 · I want to implement constants in a class, because that's where it makes sense to locate them in the code. So far, I have been implementing the following workaround with static …

  10. Private properties in JavaScript ES6 classes - Stack Overflow

    Mar 4, 2014 · The problem is, that we don't wan't to access the private variables over the Editor, we wan't to protect the private variables from outside - And that is, what public/private does. If …

Refresh