Creating Javascript objects two

Write a function that takes two strings (a and b) as arguments. Create an object that has a property with key 'a' and a value of 'b'. Return the object.
function
myFunction
(
a, b
)
{

return
}
Test Cases:
myFunction('a','b')
Expected
{a:'b'}
myFunction('z','x')
Expected
{z:'x'}
myFunction('b','w')
Expected
{b:'w'}

How to solve it

Here, we have to create an object that has a different property key in all three test cases. That means we have to dynamically define the object key. This is possible using the bracket notion (compare with this challenge to see how you can access a property value using the bracket notation).
The following example creates a new object that has one property. The key of the property equals the string value of the variable a. We define it using the bracket notation:
const a = 'x';
const object = { [a]: 1 };
console.log(object)
// output: { x: 1 };