I’ve got this code in my Meteor app:
var step = Session.get(‘stepNum’),
step = (step) < 5 ? ++step : 1;
WebStorm’s inspection claims that both lines are duplicate declarations (telling me, “Duplicate declaration (at line 77)” and “Duplicate declaration (at line 78)”
Why? This is a common pattern, declaring a var and subsequently changing its value via further assignments.