Analyzing the Vanilla JavaScript Solution