//functions
var userName = 'Max',
userAge = 28;
// первый вариант функции
var userAbout1 = function(){
console.log('My name is ' + userName + '. I am ' + userAge + ' years old')
};
userAbout1();
// второй вариант функции
var userAbout2 = function(userName, userAge){
console.log('My name is ' + userName + '. I am ' + userAge + ' years old')
};
userAbout2(userName, userAge);