Sudoku review #1

Open
BordedDev wants to merge 19 commits from BordedDev/sudoku:main into main
Showing only changes of commit a24e32249b - Show all commits

View File

@ -13,7 +13,7 @@ class EventHandler {
}
on(event, listener) {
this.events[event] ||= { name: name, listeners: [], callCount: 0 }
this.events[event] ??= { name: name, listeners: [], callCount: 0 }

Simplified the empty event handler assignment. It was meant to be ??= not ||= both will work in this case because of you how JS works though

Simplified the empty event handler assignment. It was meant to be `??=` not `||=` both will work in this case because of you how JS works though
this.events[event].listeners.push(listener)
}