0

Iterator value ani is not an entry object and plzz tell me what's the difference between under constructor and set method ??

function stu(){ this.name='ani' } var ani=new stu(); var map=new Map([ani.name,'ani']) console.log(map)

12th Sep 2021, 9:20 AM
Aniket Ganguly
1 Answer
0
Nothing is clear from your question. Maybe keep yourself in the position of answerer and imagine how difficult it would be for them to figure out what you are looking for . But as i have gone through many such questions and errors that are in the form "Iterator value ani is not an entry object", i was able to figure out ! Check this thread, https://stackoverflow.com/questions/51958509/es6-cant-create-objects-from-class You need to pass an array of array or arrays having a key and value.
12th Sep 2021, 10:01 AM
Abhay
Abhay - avatar