How does javascript understand the following?

(obj.inner.print) () and (obj.inner.print = obj.inner.print) ()) how to understand?

var num = 10;
var obj = {
    num:8,
    inner: {
        num: 6,
        print: function () {
            console.log(this.num);
        }
    }
}
num = 888;
obj.inner.print(); // 6
var fn = obj.inner.print;
fn(); //888
(obj.inner.print)(); //6
(obj.inner.print = obj.inner.print)(); //888 
Feb.28,2021

(obj.inner.print)()

is actually

.
obj.inner.print()

and

(obj.inner.print = obj.inner.print)()

is an assignment operation, returns a function, and then calls this function


the first is to run the function, (function) (), runs the anonymous function itself. The second one you can imagine is that you eat drumsticks. You take drumsticks in your left hand and replace them with your right hand.

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-1b3620c-2bff7.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-1b3620c-2bff7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?