Problem solving tasks JavaScript

Hello and good day! Hope someone can help me with the practical tasks.
Im so stuck and i have no idea how to move forward.

This is the task:

Hello you

Write a program that will read a name as input from the console and salute the person.


  • On the single line you will receive a name (ex: John)


  • You should print a salutation to the person (ex: Hello, John!)




Hello, John!

And this is my solution :
function greeting (name = ‘John’) {
print(Hello, ${name}!)

Ps. I’m using the proper syntax for string interpolation.

The system keeps rejecting it and i have no idea why.
I ran the code in VS Code and it works. So can somebody tell what I’m doing wrong?

Hi @emil.k.koulinski, try passing gets() to the function call.

That’s the one thing I just can’t get… I tired reading the article but it’s just poorly explained or I am too dull to understand it.

Can I ask if you can give me an active example, it tried several times but alas no success.

Here you just need to change the last line like so:


In the materials there was an explanation on how to use it.:slight_smile: