+ 1

What should I do to get out of practice and continue learning? I am stuck here from days

I did my practice section properly but now it says a tick on test case #1 and a cross on test cases #2 #3#4. I don't know what to do. Please help me if you can. Thanks

15th Jan 2023, 8:33 AM
Khola Memon
Khola Memon - avatar
12 Respuestas
+ 2
Yes, the code needs to greet every user, not just Tom. So replace "Tom" with name, and it should pass. That one test case passed because it was the default. Variables like name allow you to use them anywhere in your code. So if you want to greet anyone other than Tom, just assign that value to the name variable. Eg. let name = "Hannah" console.log("Welcome, " + name + "!") will output: Welcome, Hannah! Just changing name to name = "Tom" keeping the rest of the code same will output: Welcome, Tom! Your code should always use variables and the values are provided by the user in most cases (in your code, name = readLine()).
16th Jan 2023, 12:09 PM
Avinash Suresh
+ 3
If you are doing practice tests online, the best thing to do is to contact the provider of the test and ask for help. They should be able to provide you with more information about why the test cases are marked as they are and what you can do to improve your performance. If you are doing practice tests in a classroom setting, talk to your instructor or tutor for advice on how to improve your performance. Additionally, make sure that you are studying the material thoroughly and understanding it before attempting any practice tests.
15th Jan 2023, 8:52 AM
Reza Mardani
Reza Mardani - avatar
+ 1
Introduction to Javascript. Lesson String Concatenation: Welcome Message? Getting User Input You are organizing an important event and you should greet each participant with a welcome message․ The given program takes the name of the guest as input.
16th Jan 2023, 4:18 AM
Chris Coder
Chris Coder - avatar
+ 1
Chris Coder but in the instruction it says only Tom"s name and I have done it so tst case 1 has a tick . Then i went in the tset cases it says cross on, those are different names. If I do the names said in expected output of the test cases # 2 3 4 5, with the same process, it says error 😞. Btw thanks a million for your help 🙏
16th Jan 2023, 6:49 AM
Khola Memon
Khola Memon - avatar
+ 1
You still have not showed me your attempt. In other words show me what you put.
16th Jan 2023, 8:02 AM
Chris Coder
Chris Coder - avatar
+ 1
Khola Memon Great🙌
16th Jan 2023, 5:06 PM
Avinash Suresh
0
im Reza But I am doing it on solo learn and the practice is at the end of the lesson in the course, intro to Javascript. Now I can't move to another lesson because I am stuck here 😥
15th Jan 2023, 8:58 AM
Khola Memon
Khola Memon - avatar
0
Chris Coder Course: Introduction to Javascript module 2: operaters and strings lesson: String Concatenation
15th Jan 2023, 9:23 PM
Khola Memon
Khola Memon - avatar
0
I'm not able to access that course. If you have a x mark on the test cases then your code is not entirely correct. Provide the instruction, and your code attempt.
15th Jan 2023, 9:57 PM
Chris Coder
Chris Coder - avatar
0
Chris Coder let name =readLine(); console.log("Welcome, " + "Tom" + "!"); This was my code for that practice
16th Jan 2023, 8:15 AM
Khola Memon
Khola Memon - avatar
0
Avinash Suresh OMG! It worked 🤩 many many thanks ❤💕
16th Jan 2023, 4:33 PM
Khola Memon
Khola Memon - avatar
0
// Sample Input var name = readLine(); // Concatenate strings using the + operator var welcomeMessage = "Welcome, " + name + "!"; // Output the welcome message console.log(welcomeMessage);
12th Sep 2023, 1:19 PM
Vineela P
Vineela P - avatar