3liYusuf / js-objects-lab

0 stars 0 forks source link

Semantic names #1

Open KhalilKhunji opened 3 weeks ago

KhalilKhunji commented 3 weeks ago

https://github.com/3liYusuf/js-objects-lab/blob/27bc3d2301bd3029c9d81608b81de9a5647c6b91/app.js#L76-L80

Rather than key, you can try using more semantic names to make your code clearer and easier to read; in this case calling it gym instead.

KhalilKhunji commented 3 weeks ago

https://github.com/3liYusuf/js-objects-lab/blob/27bc3d2301bd3029c9d81608b81de9a5647c6b91/app.js#L213-L215

This example's even more clear; why call it poky instead of gym? It's a little bit confusing to read at a glance.