I was looking over one of the minified js files generated by closure. I found that wherever I'm checking for equality between a variable and string like,
a == "13" || a == "40"
closure replaces it with
"13" == a || "40" == a
Why is this modification done? Is there some performance advantage here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…