Freecodecamp: No knowledge to solve this task based on previous tasks learned.

Created on 14 Apr 2017  路  3Comments  路  Source: freeCodeCamp/freeCodeCamp

Noobies can't solve this task as in previous tasks there was no Functions learned. It is confusing for them. Before solving this task, need to introduce user with function construction etc. See all the previous tasks. Only variables, datatypes, operators. No functions, no methods.

Challenge Word Blanks has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line


  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

Most helpful comment

I completely agree. The explanations do not provide enough concepts. only syntax to copy.
In addition to no explanation about functions, other concepts critical to this exercise that isn't explained:

  • passing arguments
  • return statement

All 3 comments

Consider these challenges as the preparation:

Concatenating Strings with Plus Operator Complete
Concatenating Strings with the Plus Equals Operator Complete
Constructing Strings with Variables Complete
Appending Variables to Strings

Ask for help in the chat room if you are still unsure of how to proceed.

I completely agree. The explanations do not provide enough concepts. only syntax to copy.
In addition to no explanation about functions, other concepts critical to this exercise that isn't explained:

  • passing arguments
  • return statement

I found the instructions for this exercise very confusing too. For simplicity's sake by not going into a lengthier explanation of functions, to proceed with this exercise, ignore the function construct.

Explaining the "return" statement also requires explaining functions, so all you need to know here is that the "result" variable of this return statement is the objective.

The var result = ""; line already declares the "result" variable name, so the point of the exercise is to build a single "result" String variable with the 4 variable names shown in the function line:
myNoun, myAdjective, myVerb, myAdverb

In other words, create a sentence using the 4 function variable names and assign that sentence to the "result" variable.

If you want to start learning how functions work, then follow the last step of the exercise's instructions by changing some one of the string words in the last line in the program.

Was this page helpful?
0 / 5 - 0 ratings