I have a few variables:
name age address phone social_security email weight
And an array called personal_details with each of
personal_details
You could do this since a nil value returns false and || will only evaluate the right-hand side if the left-hand side is false:
nil
||
name = personal_details[0] || ''