question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Challenge: Word Blanks should have tests to make sure campers use function parameters

See original GitHub issue

A low priority/bike shedding issue, but I figured it’s worth mentioning anyways.

Supplied code passes, but defeats the purpose of the challenge. It’s unlikely that someone would ever do this, but I do recall seeing similar code being posted in one of the Gitter rooms.

Challenge Word Blanks

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  result = "dog big ran quickly cat little hit slowly";

  // Your code above this line
  return result;
}

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

The code I saw in chat looked something like this (from what I remember at least):

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "dog big ran quickly ";
  // Your code below this line
  result += "cat little hit slowly";

  // Your code above this line
  return result;
}

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

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Bhargavbonucommented, Aug 5, 2016

First of all the challenge itself is not clear with poorly framed and confusing question. Despite reading multiple times I don’t understand what the question expects. Can the FreeCodeCamp look after this question and change it? You will need to use string operators to build a new string, result, using the provided variables: myNoun, myAdjective, myVerb, and myAdverb.

You will also need to use additional strings, which will not change, and must be in between all of the provided words. The output should be a complete sentence.

We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to make sure all of the provided words appear in the output, as well as your extra strings.

result+= “My “+myAdjective+” “+myNoun+” “+myVerb+” very “+myAdverb+”.”;

0reactions
siguniangcommented, Dec 29, 2016

removed solution by mod

Read more comments on GitHub >

github_iconTop Results From Across the Web

freeCodeCamp Challenge Guide: Word Blanks
We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to ......
Read more >
SAMHSA TIP 35 Enhancing Motivation for Change in ...
This Treatment Improvement. Protocol (TIP) reflects a fundamental rethinking of the concept of motivation as a dynamic process, not a static client trait....
Read more >
9 Hypothesis Tests
The objective of hypothesis testing is to decide, based on sample information, if the alternative hypotheses is actually supported by the data. We...
Read more >
Lung Volumes - Physiopedia
Lung volumes measurement is an integral part of pulmonary function test. These volumes tend to vary, depending on the depth of respiration, ethnicity,...
Read more >
mgcv.pdf
Models to be compared should be fitted to the same data using the same smoothing parameter selection method. Usage. ## S3 method for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found