JS
challenger
Home
JavaScript Practice
JavaScript objects
Creating Javascript objects one
Creating Javascript objects one
Write a function that takes a string as argument. Create an object that has a property with key 'key' and a value equal to the string. Return the object.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console