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
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:
:star2: 1529 | @masd925 |http://www.freecodecamp.com/masd925
CodeNeophyte
@CodeNeophyte
hello all. I'm having some trouble with my twitch zipline. I'm not sure why from the two channels that are supposed to give me an error only one is coming through. Any help would be greatly appreciated. http://codepen.io/TheCodeNeophyte/pen/yOWQzV?editors=0010
Saurabh Parihar
@parihars
@adityaparab are you here
Darth Skywalker
@adityaparab
@parihars : Whats up?
Saurabh Parihar
@parihars
come to codepad

//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{
"firstName": "Harry",
"lastName": "Potter",
"number": "0994372684",
"likes": ["Hogwarts", "Magic", "Hagrid"]
},
{
"firstName": "Sherlock",
"lastName": "Holmes",
"number": "0487345643",
"likes": ["Intriguing Cases", "Violin"]
},
{
"firstName": "Kristian",
"lastName": "Vos",
"number": "unknown",
"likes": ["Javascript", "Gaming", "Foxes"]
}
];

//still showing error
function lookUpProfile(firstName, prop){
// Only change code below this line
var j=0;
var k=0;
for(var i=0;i<contacts.length;i++)
{
if(firstName == contacts[i].firstName){
return contacts[i][prop];
}
if(firstName!==contacts[i].firstName)
j++;
if(!contacts[i].hasOwnProperty(prop))
k++;
}
if(j==contacts.length)
return "No such contact";
if(k==contacts.length)
return "No such property";
// Only change code above this line
}

// Change these values to test your function

(lookUpProfile("Akira", "address"));

how to return No such property
Help me
CamperBot
@camperbot

:point_right: adding snippets to sublime text [wiki]

Adding Snippets To Your Sublime Text Installation

If you are a user of sublime text (I hope you are, it kicks ass. You can get it here), then you may have already noticed some of the tab completion capabilities. For example, when you are opening an html tag such as <p>, it automatically closes the tag as soon as you type /. You can get similar functionality for pieces of code you end up re-writing over and over, and it's surprisingly easy!

Here's an example, which activates after typing div and then tab:

alt text

:pencil: read more about adding snippets to sublime text on the FCC Wiki

Saurabh Parihar
@parihars
Blauelf
@Blauelf
@parihars You return the property without checking it is there. Instead, you could simply nest some additional if with if(contacts[i].hasOwnProperty(prop)), also, I do not see any use of j and k.