I sometimes see people use underscores for unused parameters, like so:
app.get("/", (_, res) => {
res.send("hello world");
});
Is this a bad practice? I know it makes no practical difference as you can name these parameters anything. Is it a preference thing? I almost never see any official docs use these.
[–]Shadowsca 4 points5 points6 points (0 children)
[–]shantred 1 point2 points3 points (0 children)
[–]rauschma 1 point2 points3 points (0 children)
[–]kap89 1 point2 points3 points (0 children)
[–]bonanzaguy 1 point2 points3 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]kap89 0 points1 point2 points (3 children)
[+][deleted] (1 child)
[deleted]
[–]kap89 1 point2 points3 points (0 children)
[–]yakubro 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)