News for hackers. Stuff that matters.
Re:JavaScript private class fields considered harmful by llamaLord on Saturday April 29, 2023 @05:35PM (#35757445)
Can you explain wrist you mean by those two examples being different things?

Do you mean that 'res' evaluates to a different result in each?

Or that when you call 'object.method()' vs calling 'm()' you would get a different 'this' context?

Re:JavaScript private class fields considered harmful by mst on Monday May 01, 2023 @01:02PM (#35775712)
I completely messed up one of the examples, sorry.

I meant the 'this' thing - a sibling comment to yours contains the correct code.