Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Operator: `in`
- `x in y` returns `true` if `x` is a valid property of `y` or its prototype chain.
- ```JavaScript
- > "foo" in {foo: 3}
- true
- > 2 in ["a", "b", "c"]
- true
- ```
- ### Operator: `typeof`
- `typeof x` or `typeof(x)` returns the type as a string.
- ### Operator: `instanceof`
- `x instanceof y` returns true if `x` is an object of type `y`.
- ```JavaScript
- > class A {}
- > (new A) instanceof A
- true
- ```
- ### Operator: `void`
- `void x` or `void(x)` evaluates expression `x` and returns `undefined`.
- ### Keyword: `this`
- Refers to the current object.
- # Keyword: `super`
- Refers to the parent of the current object.
- Usually to call the parent constructor:
- ```JavaScript
- > super(props)
- ```
- but also can be used to call functions on the parent:
- ```JavaScript
- > super.foo()
- ```
Add Comment
Please, Sign In to add comment