On the problem of variable assignment svg

I have a d3.js and do some operations through var svg = d3.selectall () xxxxx; then this.svg = svg finds that there are not many methods in svg in this.svg, but if there are these methods in this.svg after this.svg.__proto__ = svg.__proto__, I want to know why I can"t assign values directly. Thank you

Aug.06,2021

should you new the object you created first?


prototype chain learn about

Menu