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
Markus Kiili
@Masd925
@parihars First you need to loop or iterate through the contacts array.
@parihars Then figure out how to access one contact.
Ajith
@ajithvallabai
thanks @Masd925 @Blauelf
CamperBot
@camperbot
ajithvallabai sends brownie points to @masd925 and @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 1528 | @masd925 |http://www.freecodecamp.com/masd925
:star2: 1825 | @blauelf |http://www.freecodecamp.com/blauelf
Saurabh Parihar
@parihars
@Masd925 I have to make a loop inside function
Markus Kiili
@Masd925
@parihars Yes.
Ajith
@ajithvallabai
@Blauelf @Masd925 which loop is better to use
Markus Kiili
@Masd925
@parihars For loop is fine.
Myuuks
@Myuuks
@Blauelf @Athaman can you check my text ^^
pls :)
Darth Skywalker
@adityaparab

@ajithvallabai :smile:

For loop in case of small number of iterations. Like in multiples of 1000s
While loop (iterating backwards) in case of millions of records. ;)

Blauelf
@Blauelf
@ajithvallabai I think I used implicit loops, filter for cleaning from duplicates, and indexOf for finding out whether an element is in the other array.
Saurabh Parihar
@parihars
@Masd925 I am not getting can you please explain me
Blauelf
@Blauelf
@Myuuks Can you post your code?
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

ah, how can i do ?.
Kelvin-penang
@Kelvin-penang

Hi all, I'm trying to split each word of a string into seperate arrays of alphabets, within a larger array of the whole string. What I'm looking for is this ["I","'","m"] ["a"]["l","i","t","t","l","e"]...you get the point,

but I'm stumped on how to split the words, can anybody help?

```


function titleCase(str) {
  var splitOnce = str.split(" ");

 for (var i=0; i <splitOnce.length; i++){
  var splitTwice = splitOnce[[i][i]].split("");

  return splitTwice;
}
}
titleCase("I'm a little tea pot");
Blauelf
@Blauelf
@Myuuks That's not code, it's a screenshot.
Myuuks
@Myuuks
yeah how can i do ?

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

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

Blauelf
@Blauelf
Copy/Paste, format according to :point_up: 18. Mai 2016 09:33
Myuuks
@Myuuks
looks wierd like this on my screen
Blauelf
@Blauelf
@Myuuks You should probably use result = in front of your string. Also, the words are not all separate.
Saurabh Parihar
@parihars
https://coderpad.io/R3ERDJ79 join here and please help me in solving this problem
Kelvin-penang
@Kelvin-penang
This message was deleted
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 ");

Blauelf
@Blauelf
@Kelvin-penang You can type ``` without it being interpreted by using \ as an escape character.
Saurabh Parihar
@parihars
Blauelf
@Blauelf
@Myuuks Please put a line of triple backticks in front of your code, and one below, add line breaks using Shift+Return.
Markus Kiili
@Masd925
@parihars contacts is an array. Make a standard for loop over array indices.
Kelvin-penang
@Kelvin-penang
ok thanks @Blauelf I need help on my splitting exercise tho..:sweat_smile:
CamperBot
@camperbot
kelvin-penang sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 1826 | @blauelf |http://www.freecodecamp.com/blauelf
Saurabh Parihar
@parihars
@Masd925 please join on that link and help me
Kelvin-penang
@Kelvin-penang
can anybody help me in the splitting inception?
Myuuks
@Myuuks
@Blauelf my english is not great sorry xD
Blauelf
@Blauelf
@parihars Why don't you post the code here on chat?
Saurabh Parihar
@parihars

//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"]
}
];

function lookUpProfile(firstName, prop){
// Only change code below this line
for(i=0;i<contact.length;i++)

// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");

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