利用解构赋值将冗长的if else 语句改写
var fn = function (animal) {
var result = null
if (animal.name) {
if (animal.type) {
if (animal.sex) {
result = `${
animal