4 days later

Please I am having issues in task 101.

I was told to Implement a function sum in helper.js which should return the sum of two numbers
here is my code : export const sum =(4, 5) => { return 4 + 5;}; and this is the error message ● Test suite failed to run SyntaxError: /app/102102_bf4054d2-c430-42aa-afdd-0c0ed843c289/helper.js: Binding invalid left-hand side in function parameter list. (1:19)

please what do i do?

    Henry14 I've replied to your original message. You should re-read the lecture and pay attention to the words arguments and parameters

    9 days later

    i didn't know where i should post my question.. I am stuck at 9th stage of task 250.
    Here is my handler.js file:

    `export const handleKeyPress = (term, state) => {
    return (name, matches, data) => {
    data.code = String.fromCharCode(data.code);
    if (data.code == 'G' || data.code == 'g') {
    state.gold++;
    updateGold(term, state);
    } else {
    for (let i = 0; i < state.producers.length; i++) {
    if (data.code == String(state.producers.id)) {
    if (state.gold >= state.producers.cost) {
    state.gold -= state.producers.cost;
    state.producers.cost = state.producers.cost * state.producers.growthRate;
    state.producers.count++;
    }

                }
    
            }
        }
    
    }

    };`
    And here is the responce after submitting:

    24 days later

    Sameyol you should google (or try to recall from your school days) the correct formula and then use it in the function circleLength.

    2 months later
    2 months later

    Coderslang_Master Having problem on the task 2.
    Could you explain to me like a first timer what you meant by there should be no extra console,log 's in the solution.js file.
    Here is my answer to the question which as been marked failed
    console.log('I will become a JS developer this year 2022!');

      5 days later

      Lawy your solution is almost correct. Pay attention to every word and every character you print out to the console.

      Hint: there's nothing about this year in the task description.

      a month later

      This is my code in in Task121.
      export const min = (a, b, c) => {
      let minNum=0;
      if(a<b && a<c)minNum=a;
      if(b<a && b<c)minNum=b;
      if(c<a && c<b)minNum=c;
      return minNum;
      }

      But I am getting error but it is not passing test-3. The output is ok.

        16 days later

        codyfreelancers usually, it's best to create a new topic for each task you're having issues with.

        In your code example, you're missing the case when all (or some of) the arguments are equal.

        Other minor fixes you may want to make: add curly braces for each if. Use return in each if instead of using minNum

        21 days later

        hello @Coderslang_Master
        I have a problem when i want to submit task
        Here is the problem

        Test suite failed to run Cannot find module '../constants' from '152647_3d4d328c-2e7f-4d2a-9a5c-d64e8de858c9/tests/test.js'

        I hope you can help me
        Thank you so much

          petrusdrs most likely your import is off. Start by trying to add the .js to the import statement, then check if the file constants.js is in the right location.

          If nothing helps, create a separate discussion topic with your code.

          3 months later

          Good Morning; yesterday I made a post in the Tasks for assistance, but it never got answered or looked at. So I thought I would post it here.

          I am having difficulty with Task 132:

          functions.js

          export const getLocale = (userConfig, knownLocales) => {
          	let textMatch = '';
          
          	for (let i in knownLocales) {
          		if (userConfig.locale === knownLocales[i]) {
          			textMatch += knownLocales[i];
          			i++;
          			return textMatch;
          		}
          	}
          };

          Results:

          I have been at this for most of the day today. Could someone point me in the right direction please?

          Thank you

            Write a Reply...