We usually use attr() to get attribute values.
But attr() also has bad times, such as getting the attribute value of the checkbox checked
This is another jQuery method we can use prop()
$('input').prop('checked')
//true => checked
//false => unchecked
Also: this is just one of the ways to tell if a checkbox is checked