Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Commonmark migration
Source Link

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

[![enter image description here][1]][1]enter image description here


I think I've understood concepts of javascript prototype to some extent, so what I'm curious about is why prototype methods(concat() push() ...) apear both in Array and Array.prototype [1]: https://i.sstatic.net/9uEqZ.png

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

[![enter image description here][1]][1]


I think I've understood concepts of javascript prototype to some extent, so what I'm curious about is why prototype methods(concat() push() ...) apear both in Array and Array.prototype [1]: https://i.sstatic.net/9uEqZ.png

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

enter image description here


I think I've understood concepts of javascript prototype to some extent, so what I'm curious about is why prototype methods(concat() push() ...) apear both in Array and Array.prototype

added 197 characters in body
Source Link
soonoo
  • 907
  • 1
  • 13
  • 35

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

[![enter image description here][1]][1]


I think I've understood concepts of javascript prototype to some extent, so what I'm curious about is why prototype methods(concat()push() ...) apear both in Array and Array.prototype [1]: enter image description herehttps://i.sstatic.net/9uEqZ.png

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

enter image description here

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

[![enter image description here][1]][1]


I think I've understood concepts of javascript prototype to some extent, so what I'm curious about is why prototype methods(concat()push() ...) apear both in Array and Array.prototype [1]: https://i.sstatic.net/9uEqZ.png

Source Link
soonoo
  • 907
  • 1
  • 13
  • 35

What is the difference between Array.function and Array.prototype.function?

I've found that some functions like concat() push() every() both exist in Array and Array.prototype(with firefox 57.0.1 console)

It's confusing since prototype methods exist in Array.
Additionally, where does staic method(Array.from(), Array.isArray() etc) exists in?

enter image description here

lang-js

AltStyle によって変換されたページ (->オリジナル) /