It can be translated to JavaScript as:
function greeting_for (name) {
return `Hello, ${name}!`
}
console.log( greeting_for( "Marty" ) )
2
solved How to translate a ‘greeting_for’ function from Ruby to Javascript [closed]
It can be translated to JavaScript as:
function greeting_for (name) {
return `Hello, ${name}!`
}
console.log( greeting_for( "Marty" ) )
2
solved How to translate a ‘greeting_for’ function from Ruby to Javascript [closed]