Where communities thrive


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

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 2019 18:04
    thecodingaviator closed #31157
  • Apr 01 2019 18:04
    thecodingaviator closed #33788
  • Apr 01 2019 18:04
    thecodingaviator commented #33788
CamperBot
@camperbot
:star2: 1526 | @masd925 |http://www.freecodecamp.com/masd925
Markus Kiili
@Masd925
@WapmasterRohan And all characters have unicode values between 0 and 65535.
Keone Martin
@Athaman
@subhsamal paste your code?
Subh Samal
@subhsamal

var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
2468: {
album: "1999",
artist: "Prince",
tracks: [
"1999",
"Little Red Corvette"
]
},
1245: {
artist: "Robert Palmer",
tracks: [ ]
},
5439: {
album: "ABBA Gold"
}
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function updateRecords(id, prop, value) {

if(value && prop !== "tracks"){ // if (value !== " ") is same as if (value)
collection[id][prop] = value;
}

else if (value !== "" && prop == "tracks")
{
collection[id][prop].push(value);
}
else if (value === "")
{
delete collection[id][prop];

}

return collection;
}

// Alter values below to test your code
updateRecords(2548, "tracks", "Addicted to Love");

Darth Skywalker
@adityaparab

@WapmasterRohan : Every character you see on the screen is encoded in a way that the computer can understand.
There are various methods of character encoding. Earlier, it used to be ASCII now we support various characters from other languages like Hindi, Chinene, ASCII is no longer sufficient to encompass all the characters. So other standards were developed.

One of those standards is Unicode. It comes in variations like UTF-8, UTF-16 etc.

So when you have a character W, it is represented with a unicode encoding in memory. So when they say unicode sorting or ASCII sorting what they mean is that the characters are compared based on the code that represents that character based on the encoding scheme in use. Not necessarily ASCII.

V Arun Kumar
@arunvkumr
@lyett multiplyAll is function name... use arr instead. and product *= multiplyAll[i](if multiplyAll is assumed to be the array) then this represents sub array so you are multipling subarray with product, i don't think it works that way.. try using both i and j
Subh Samal
@subhsamal
collection[id][prop] = value; @Athaman How can I use push here
Keone Martin
@Athaman
@subhsamal since you check if (prop === "tracks") you can just refer to tracks directly in your code at that stage
collection[id].tracks.push(value);
is how i wrote it, seems legit to me
Subh Samal
@subhsamal
yeah I could know problem in my code, was not able to use variable instead of literal. will try this @Athaman
V Arun Kumar
@arunvkumr
@ShashiDwivedi have you defined both noContact and propPresent? in the if condition of j loop gets false and both vars are not defined then, they are undefined variables, which if takes as false.
Subh Samal
@subhsamal
what if I have to use variable prop which stores track? Any idea? @Athaman
Keone Martin
@Athaman
yeah you can just use collection[id][prop].push(value);
at least i just rewrote mine and it worked.
Subh Samal
@subhsamal

function updateRecords(id, prop, value) {

if(value && prop !== "tracks"){ // if (value !== " ") is same as if (value)
collection[id][prop].push(value);
}

else if (value !== "" && prop == "tracks")
{
collection[id][prop].push(value);
}
else if (value === "")
{
delete collection[id][prop];

}

return collection;
}'''

CamperBot
@camperbot
:bulb: to format code use backticks! ``` more info
Subh Samal
@subhsamal
@Athaman I did it. Not able to get first condition corect.
Correct *
Keone Martin
@Athaman
it's not the pop line causing troubles
Markus Kiili
@Masd925
@subhsamal On the first test, set the property value instead of pushing. (you only push to tracks which is an array)
Keone Martin
@Athaman
oh, yeah, everything except for tracks is not an array so push won't work on them
which test is failing?
i though you were talking about your tracks test failing
Subh Samal
@subhsamal
oh...I had done it using assignment which worked for me. but I was not clear with usages. so I tried doing it using push. Now it makes sense to me. @Athaman @Masd925
Keone Martin
@Athaman
glad it worked out
CP
@lubere0102
could you guys help me with Word Blanks from Basic JavaScript?
Keone Martin
@Athaman
sure thing bud, what's up?
Subh Samal
@subhsamal
thanks guys @Athaman @Masd925
CamperBot
@camperbot
subhsamal sends brownie points to @athaman and @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 1527 | @masd925 |http://www.freecodecamp.com/masd925
:cookie: 406 | @athaman |http://www.freecodecamp.com/athaman
CP
@lubere0102
i have no idea how i should start questioning

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");

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