Challenge 1 Megathread

Welcome to the first challenge!

Use this thread for any and all questions relating to challenge 1.

3 Likes

Hi, I already submitted my code. How to check if this in my account because now submit test is not showing up in challenges and I didn’t get any confirmation email a well.

2 Likes

Hey Codey, once your code is submitted, you will see a modal congratulating you.

Also if you go back on today’s challenge (Lighthouse Labs - 21-Day Coding Challenge - Sign In) and you see a discuss button and not submit button, it means that it is submitted.

2 Likes

Hi, I finished the first coding challenge, but I don’t see the 5 multiple choice questions. Where can I attept those?

4 Likes

Finished my first challenge, noticed a couple things:

  • the test code wasn’t working properly
  • did anyone else get an email saying you missed yesterday’s challenge even though the first day challenge started TODAY?

For the test I noticed it kept saying:
"Running test: The parseMessage function should return a string

Running test: The parseMessage function should return the string in the proper format"

It wasn’t clear if that meant I passed the test or not, so I just submitted it and looked like it was ok.

9 Likes

Hello! I’m having a bit of trouble getting my code to work:

So this is how I structured my function in a sense:

function Talking(name, message) { //I want to have 2 parameters passed in my function
const origin = “Misson Control” ;
const greeting = “Hello There!” ;
let parseMessage = origin, greeting ; //I want parseMessage to equal two items
return ‘parseMessage.tostring’ ; //I want to pass parseMessage into the function with its two items (origin and greeting)
}

My questions are:

  • Since there are two parameters that need to be passed into the function, does the parseMessage register as two items that will pass into the function parameters? Or will it be one item that only defines say name or message?
  • I’m still getting a lot of errors from my coding saying that parseMessage has not been defined and that I’m not returning a string value.

Any help is greatly appreciated!

1 Like

I have no idea what the technical definition of the words here are. If I’m to make progress, I need explanation, if you can give them to me. I’m a senior with no programming background. Is there an online-tutorial that can help a rank beginner, step by step? Already I’m out of my depth. I don’t understand the instructions at all? I’ve done stuff on home computers since 1983, but it’s all been work on applications, not programming. Mostly it’s been with word processing programs. I find this all very threatening. Don’t even understand the initial instructions. Please, HELP!!! - Marian

14 Likes

I dont know if this is too much info but it is just looking for you to create a string (text) with both variables. Kinda like math, you can use a plus sigh to combine different expressions. so word1 + word2 = word1word2. or in your case, origin and message there is a colon in there so you will have to add that in the middle. Return that string as your last line of code. Dont forget every line needs a semicolon at the end. two lines of code are all you need for this one.

The page is not letting me submit my code ?

It says that I’m failing the 2nd test because it doesn’t match what’s expected:

*** Expected: :**

*** Actual: MC: Hello**

Am I missing something? the result appears to be the exact same as expected.
Thank you

3 Likes

What is the expression you are using to add the strings together?

I’m getting the same error. Before I had the error saying the expected was supposed to be MC: Hello but then I fix it to show that. And it tells me the expected is now just ‘:’ ? Super confusing.

You should see a message below what you listed in the ‘Test Results’ section that says " Woohoo! All of your tests passed!". ‘Test Results’ is to the left of the ‘Hints’ section. Ignore the deleted message, I wasn’t sure it was posted as a reply to your message at first (vs. the overall thread).

Hey Khuynh,

In your code, you’re declaring the function, telling the computer that this is a function you will be using later and explaining how it should work. Later, you will invoke the function (use it to do something).

‘name’ and ‘message’ are the parameters that you’re saying will be used in the function. They’re blank variables to represent whatever you will be passing to the function later. The problem is that you haven’t used them in your function declaration. You should have something in your function declaration called ‘name’ and something called ‘message’ to show where the parameters will be used.

I would say to look at this part of your code:

const origin = “Misson Control” ;
const greeting = “Hello There!” ;

You can put your function parameters somewhere in there. Think also about whether you want to hard-code the strings “Mission Control” and “Hello There!” or whether you want origin and greeting to be flexible enough to accept any string that is passed to the function as an argument later on. :grinning:

Edit: You might have to fiddle with your parseMessage variable and how you’re combining the strings as well.

1 Like

I am guilty of it myself usually but it feels like people are over-thinking and in turn over-complicating the challenge.

1 Like

Im not sure if you can return an expression directly or have to create a variable and return that. if the first part is right, you can return the expression with one line of code and be done. if you have to return a variable, then you can do it with two lines

Hi there,
In the challenge they’ve already defined the function name and parameters for you in this line:
const parseMessage = (origin, message) => {
The function is “parseMessage” and “origin” & “message” are the two strings you need to concatenate; you don’t need to worry about giving “origin” & “message” values, the challenge will pass values for them into the function.

Your main focus is on combining (concatenating) those two parameters and then returning the result; it might be looking for a ": " between them as well (refer to sample output). Take a look at your “let parseMessage = origin, greeting” line as you’ll want to try another way to concatenate I believe. Good luck!

1 Like

This information should be in the challenge, why frustrate people trying to learn something on day 1?

7 Likes

If you’ve gone looking for some other way to accomplish the task, how do you reset the challenge back to the predefined code?

2 Likes

You can use concatenation “+”

This is the most important aspect of the challenge yet it is not addressed anywhere, or if it was beginners like me can miss it easily.

5 Likes