I was going through a piece of js example code(im still learning) then i came across this part
(
class Network {
constructor(connections, storageFor) {
let reachable = Object.create(null)
for (let [from, to] of connections.map(conn => conn.split("-"))) {
;(reachable[from] || (reachable[from] = [])).push(to)
;(reachable[to] || (reachable[to] = [])).push(from)
}
this.nodes = Object.create(null)
for (let name of Object.keys(reachable))
this.nodes[name] = new Node(name, reachable[name], this, storageFor(name))
this.types = Object.create(null)
}
defineRequestType(name, handler) {
this.types[name] = handler
}
everywhere(f) {
for (let node of Object.values(this.nodes)) f(node)
}
}
)()
I need clarity on this part
;(reachable[from] || (reachable[from] = [])).push(to)
;(reachable[to] || (reachable[to] = [])).push(from)
Why does the semicolon preceed the expression?