== Why is this an issue?

Javascript has a prototypical inheritance model. Each object has an internal property that points to another object, called a `prototype`. That prototype object has a prototype of its own, and the whole sequence is called a *prototype chain*. When accessing a property or a method of an object, if it is not found at the top level, the search continues through the object's prototype and then further down the prototype chain. This feature allows for very powerful dynamic inheritance patterns but can also lead to confusion when compared to the classic inheritance.

To simplify the access to the prototype of an object some browsers introduced the `\\__proto__` property, which was later deprecated and removed from the language. The current ECMAScript standard includes `Object.getPrototype` and `Object.setPrototype` static methods that should be used instead of the `\\__proto__` property.

[source,javascript]
----
let prototype = foo.__proto__;  // Noncompliant, use Object.getPrototype
foo.__proto__ = bar; // Noncompliant, use Object.setPrototype
----

To fix your code replace `\\__proto__` with calls to `Object.getPrototype` and `Object.setPrototype` static methods.

[source,javascript]
----
let prototype = Object.getPrototype(foo);
Object.setPrototype(foo, bar); 
----

== Resources
=== Documentation

* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain[MDN - inheritance and the prototype chain]
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto[MDN - \\__proto__]
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf[MDN - Object.getPrototypeOf] 
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf[MDN - Object.setPrototypeOf] 