What are “class fields” in JavaScript?
问题 I was reading about JavaScript classes, and came across this term " public class fields syntax ". On digging a bit deeper into it I came across this Babel's documentation on class properties. Can someone please explain - implementation-wise what are the use-cases for this new syntax? (What solutions/benefits does it offer to JavaScript, which were missing so far?) Here's an example below (ran without errors in Google Chrome) : class Person { firstName = "Mike"; lastName = "Patel"; // this is