A very common piece of JS code, but there is a very strange problem.

The

code is as follows. Anchor is a map structure. If you get an element in anchor according to id, there is no problem printing anchor.get (id), but getting attributes in anchor.get (id) is empty, which makes me do not understand

.
    function sendLiveOffer(id) {
        console.log(id)
        console.log(anchor.get(id))
        console.log(anchor.get(id).localDescription)
        let sdp = anchor.get(id).localDescription
        let offer = {
            name: "anchor",
            target: id,
            type: "video-offer",
            sdp: sdp
        }
        console.log("offer ")
    }

Mar.01,2021

you won't be confused if you know that the object is a reference type.

give you a piece of code reference, but there's nothing you can do if you don't understand it:


 let info = anchor.get(id);
 let desc = info.localDescription;

can you give me a guide?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49332-44d09.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49332-44d09.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?