We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Using underscore ("_") as the variable name in the for appears to be common practice when you don't intend to use the variable in the loop. Underscore is a valid variable name, so you could use it in the loop, but it would make for unreadable code (what does underscore mean?) so using it designates that the variable has no meaning or is otherwise unnecessary.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Equal
You are viewing a single comment's thread. Return to all comments →
Using underscore ("_") as the variable name in the for appears to be common practice when you don't intend to use the variable in the loop. Underscore is a valid variable name, so you could use it in the loop, but it would make for unreadable code (what does underscore mean?) so using it designates that the variable has no meaning or is otherwise unnecessary.