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
zhangx007
@zhangx007
hello,i am new here
Markus Kiili
@Masd925
@parihars It is contacts.
Saurabh Parihar
@parihars
@Masd925 yeah i m changing it
Markus Kiili
@Masd925
@parihars Then figure out how to access one contact inside the array of contacts.
Blauelf
@Blauelf
@Myuuks
```js
function yourCode(arg1) {
var foo;
return "bar";
}
```
becomes
function yourCode(arg1) {
  var foo;
  return "bar";
}
Myuuks
@Myuuks
allright thanks
Keone Martin
@Athaman
sorry, wandered off for a bit
Myuuks
@Myuuks
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line

 result = "when i saw a " + myAdjective  + myNoun + "i " + myVerb + myAdverb;

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog ", "big ", "ran ", "quickly ");
it works but
Keone Martin
@Athaman
remember myuuks if you take "one word" + "another word" you get "one wordanother word" so when you add two words together which are stored as variables, like myAdjective and myNoun, you need to use myAdjective + " " + myNoun
Darth Skywalker
@adityaparab
@parihars :smile:
for(var i=0;i<contacts.length;i++) {
       if(firstName == contacts[i].firstName){
             return contacts[i][prop];
       }
}
Rohan Gayen
@WapmasterRohan

Caesars cipher

function rot13(str) { // LBH QVQ VG!
  for(var i=0;i<str.length;i++) {
    if(str.charCodeAt(i) >= 65 && str.charCodeAt(i) <= 90) {
      if(str.charCodeAt(i) < 78) {
        str[i] = String.fromCharCode(str.charCodeAt(i) + 13);
      }
      else {
        str[i] = String.fromCharCode(str.charCodeAt(i) - 13);
      }
    }
  }
  return str;
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");

what is the problem?
TypeError: Cannot assign to read only property '0' of string 'SERR PBQR PNZC'

Saurabh Parihar
@parihars
there is also else condition
@adityaparab
Darth Skywalker
@adityaparab
@parihars : Sorry I don't know the problem statement. I just fixed syntax and semantic errors.
Myuuks
@Myuuks
is that better @Athaman :
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line

 result = "when i saw a " + myAdjective+ "" + myNoun + "i " + myVerb + "" + myAdverb;

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
Saurabh Parihar
@parihars
@adityaparab No problem buddy Thanks!!
CamperBot
@camperbot
parihars sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 258 | @adityaparab |http://www.freecodecamp.com/adityaparab
Myuuks
@Myuuks
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line

 result = "when i saw a " + myAdjective + "" + myNoun + "i " + 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
"" is no space " " is a space
Myuuks
@Myuuks
ok :)
Keone Martin
@Athaman
also you'll need a space in front of i so " i "
this challenge is just to make people aware of how annoying joining strings can be :D
cnj1987
@cnj1987
Can anyone help me? D:
Myuuks
@Myuuks
yeah it's xD
Keone Martin
@Athaman
@cnj1987 what do you need?
Rex
@RexChip
<div id="wrapper">

<table id="records">
<thead>
<tr>
<th class="long-cell">Input</th>
<th class="long-cell">E-Mail</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3" style="padding:10px;">
<button type="button" onclick="Normalizer.clear();">Clear all history</button>
</td>
<td><div id="pagination">test</div></td>
</tr>
</tfoot>
<tbody></tbody>
</table>
<footer>
</footer>
</div>
cnj1987
@cnj1987

Thanks @Athaman :)

Call the processArg function with an argument of 7 and assign its return value to the variable processed.

// Example
var changed = 0;

function change(num) {
  return (num + 5) / 3;
}

changed = change(10);

// Setup
var processed = 0;

function processArg(num) {
  return (num + 3) / 5;
}

// Only change code below this line


processArg(7);
return processed;
CamperBot
@camperbot
cnj1987 sends brownie points to @athaman :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @athaman |http://www.freecodecamp.com/athaman
Rohan Gayen
@WapmasterRohan
can anyone help me??
Rex
@RexChip
this is my code, it will make some data like : test at gmail com -> test@gmail.com , in tbody, i don't know how to add to pagination
can anyone tell me how to add to pagination ? thank you
Myuuks
@Myuuks
@Athaman on this site we only use var when i tryed to learn we used : String , char & others stuffs, that's why i'm a bit lost
Keone Martin
@Athaman
@cnj1987 which challenge is it?
cnj1987
@cnj1987
Assignment with a Returned Value
Keone Martin
@Athaman
yeah, having not fixed data types is a brave new world for me too @Myuuks
@cnj1987 ok so the challenge is pointing out how returns work. when you call a function it will send back a piece of information in the return statement. but if you don't do anything to capture that information it just gets lost. so here they want you to declare a variable next to the processArg(7) line like var processed = processArg(7);
cnj1987
@cnj1987
AH!
Divyam Bhagchandani
@divyambhagchandani

guys ! help me with counting cards problem !

var count = 0;

function cc(card) {
// Only change code below this line

if(card==2,3,4,5,6){
count++;
}
if(card==10,'J','Q','K','A'){
count--;

}
if(count>0){
return count "Bet" ;

}
if(count<0){

return count "Hold";

}

return "Change Me";
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');

Keone Martin
@Athaman
so that when processArg(num) is run it sends back (num + 3) /5 which gets stored in the new variable... so in this case it will send back 2 and processed will be set to 2
Markus Kiili
@Masd925
@divyambhag return count+" Bet"; etc
cnj1987
@cnj1987
That makes so much more sense. Thanks @Athaman, I passed it now. :D
CamperBot
@camperbot
cnj1987 sends brownie points to @athaman :sparkles: :thumbsup: :sparkles:
:warning: cnj1987 already gave athaman points
Keone Martin
@Athaman
glad to help :)
cnj1987
@cnj1987
I really struggle with functions, still. It seems like pretty much every time I see one, I'm lost
Divyam Bhagchandani
@divyambhagchandani
oh thanks @Masd925
CamperBot
@camperbot
divyambhag sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles: