Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
CP
@lubere0102

You will also need to provide additional strings, which will not change, in between the provided words.

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.

Subh Samal
@subhsamal
paste your code and mention your problem
CP
@lubere0102
wordBlanks("","","","") should return a string.
wordBlanks("dog", "big", "ran", "quickly") should contain all of the passed words separated by non-word characters (and any additional words in your madlib).
wordBlanks("cat", "little", "hit", "slowly") should contain all of the passed words separated by non-word characters (and any additional words in your madlib).
Keone Martin
@Athaman
@lubere0102 so the challenge gives you a function call with a bunch of words called myNoun, myAdjective, myVerb, myAdverb.
Saurabh Parihar
@parihars
how to solve Profile Lookup problem
Keone Martin
@Athaman
you need to stick them together into 1 string called result
CP
@lubere0102
ok
Keone Martin
@Athaman
you can join strings together using the + operator
CP
@lubere0102
ah
Keone Martin
@Athaman
var oneWord = "whargarbl";
var anotherWord = "blargh";
var together = oneWord + anotherWord // together now = "whargarblblargh" <-- notice that no space was added between the words
CP
@lubere0102
how do you capture like that?
Keone Martin
@Athaman
help format
CamperBot
@camperbot

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Keone Martin
@Athaman
@parihars which part is confusing you?
Subh Samal
@subhsamal
var result = "my " + myAdjective +" "+ myNoun +" " + myVerb+" " + myAdverb; @lubere0102 try like this
Keone Martin
@Athaman
bro, if you give people the answer directly like that it doesn't really give them a chance to learn the content
also in the challenge var result = ""; has already been set... so you just want result = ... :P
Subh Samal
@subhsamal
my bad :P
CP
@lubere0102
thank you i just didn't get what i was supposed to do
Keone Martin
@Athaman
no problem :) sorry if i sounded hostile, i'm struggling to find the right words but it's a common thing on the channel to just give the answers which i think isn't the best solution
sometimes if someones obviously got the logic and just has a typoe, or uses the wrong variable somewhere or something it makes sense to just tell them where it's wrong and pass the solution, but normally i start off with clues and analogies.
Subh Samal
@subhsamal
yes you sound correct buddy
Keone Martin
@Athaman
:)
Subh Samal
@subhsamal
:blush:
Keone Martin
@Athaman
sorry also if i sound high and mighty.
Subh Samal
@subhsamal
np
CP
@lubere0102
thank you all
sdf
Keone Martin
@Athaman
no problem @lubere0102 :) enjoy the challenges
CP
@lubere0102
thank you for that capturing method too

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

    var result = "my " + myAdjective +" "+ myNoun +" " + myVerb+" " + myAdverb; 
  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
Keone Martin
@Athaman
no worries, it's good to know. much easier to help people when the code is all pretty and formatted
CP
@lubere0102
very good
Michael
@michaelpautov

hello
var myVar = 87;

// Only change code below this line
myVar = myVar;
myVar = myVar;
myVar = ++myVar;

dont' working ex myVar = myVar should be changed
Keone Martin
@Athaman
myVar = myVar; won't do anything, all it does is tell myVar to be itself
like 5 = 5;
the increment by one shorthand needs to be on the end of the variable like myVar++;
but it doesn't need to be reassigned because that's part of the short hand
so myVar = myVar++; is the same as myVar = myVar = MyVar + 1;
Blauelf
@Blauelf
++myVar first increments myVar, then evaluates to the incremented value (in contrast to myVar++, which also increments myVar, but evaluates to the old value), so myVar = ++myVar; should be same as ++myVar;
Keone Martin
@Athaman
oh right, i didn't think JS had increment first in it sorry...
Michael
@michaelpautov
thank
Keone Martin
@Athaman
you're welcome
Myuuks
@Myuuks
@Athaman i dont understand what's asked for the exercice called "Woord Blanks"
-o
Blauelf
@Blauelf
You are meant to return a sentence containing all those words passed to your function.
Keone Martin
@Athaman
similar to before when you used your name + another string
Blauelf
@Blauelf
@Myuuks So for "big","dog","ran","quickly" it might return something like "When I saw a big dog, I ran quickly."