+ 1

Why is the answer of a is 7 and b is 3 in JS?

let a=(1+2,3+4); console.log(a); b=1+2,3+4; console.log(b)

18th Jan 2022, 7:39 PM
Bikesh Shrestha
3 odpowiedzi
+ 2
It's called the comma operator https://m.youtube.com/watch?v=IvqdQB549KQ
18th Jan 2022, 8:03 PM
Bono
Bono - avatar
+ 1
Like what?
18th Jan 2022, 7:43 PM
Chigozie Anyaeji 🇳🇬
Chigozie Anyaeji 🇳🇬 - avatar
+ 1
Thanks Bono bro
18th Jan 2022, 8:10 PM
Bikesh Shrestha