We're a place where coders share, stay up-to-date and grow their careers.
I'm not sure you can call your first example as something a pro would write
let hungry = true; let eat = hungry == true ? 'yes' : 'no';
hungry == true really?
hungry == true
Better like this:
hungry ? “Yes” : “No”
Exactly 😆
I'm not sure you can call your first example as something a pro would write
hungry == true
really?Better like this:
hungry ? “Yes” : “No”
Exactly 😆