Think `substring(5, 1)` in JavaScript gives you an empty string? Think again! 😲
JavaScript's `substring()` method automatically swaps the indices if the first is greater than the second.
In this quick #JavaScript short, we break down what `str.substring(5, 1)` really does—and why it might surprise you!
🔔 Subscribe for more daily #CodingTips, #WebDevelopment tricks, and #JSShorts to level up your dev skills!
#programming #devshorts #learnjavascript #codequickies #webdeveloper #frontend #shorts #coding #jstips