Question #43

Author: admin
tags: JavaScript  
function showMessage({name, age}, city) {
  console.log('Hi, ' + name + '! Your age: ' + age + '. Your city: ' + city + '.');
}
How to call the function so that the line Hi, Tom! Your age: 35. Your city: Paris. appears in the console?
showMessage('Tom', 35, 'Paris');
showMessage({ 'Tom', 35 }, 'Paris');
showMessage({ name: 'Tom', age: 35 }, 'Paris');
showMessage({ name: 'Tom', age: 35, city: 'Paris' });
There is no right answer.
Here is the usual destructuring of function arguments.
Rate the difficulty of the question:
easyhard