JavaScript declare a variable and use the comma operator in one statement?
问题 it's known that to declare multiple variables, one uses a format like: let k = 0, j = 5 /*etc....*/ It's also known that to execute multiple statements in one line (which is useful for arrow functions, making it not necessary to write the return keyword), the comma "," operator is also used, like so: let r = "hello there world, how are you?" .split("") .map(x => (x+=5000, x.split("").map( y => y+ + 8 ).join(""))) .join("") console.log(r) not the most elegant example, but the point is you can