Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
alteducation
@alteducation
@RogeMateos if you dont specify flex values it will take up the width required to fit content
Roge
@RogeMateos
ok i think i understand , and what is happening is the feature image is filling more content there and making FEATURE div bigger than ASIDE
alteducation
@alteducation
@RogeMateos yeah
Roge
@RogeMateos
ok that is clear now
many thanks for your help
i really appreciate your time
alteducation
@alteducation
@RogeMateos you can override that by assigning your own value :)
@RogeMateos no issues.
Roge
@RogeMateos
yes i understand
buiphuking
@buiphuking
anyone has experience with httrack here, i want to ask something....................
B
@B-keen
@khaduch it's returning the entire collection
Stephen James
@sjames1958gm
@B-keen you are supposed to update and return the entire collection from the instructions . . .
Your function must always return the entire collection object.
Ashwin
@ashwins93

https://codepen.io/ashwins93/full/qPrBRE/

I just completed my markdown previewer project. I am just interested to know if this could be completed without __dangerouslySetInnerHTML. And btw where are you guys learning React from? I learned through codecademy but i'm not sure if i really understand everything, can you give me some pointers?

Tomáš Dvořák
@Deepress
Hi guys, anyone tried to override bootstrap 4 variables in sass ? they're all set as !default so i can do exactly nothing :/
Stephen James
@sjames1958gm
@ashwins93 Not sure you can do that without that function. Maybe in React 16, but not sure. I learned react from Udemy course.
Ashwin
@ashwins93
@sjames1958gm Will check out the course, thanks!
CamperBot
@camperbot
ashwins93 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8550 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
@ashwins93 There is an instructor Andrew Mead that I recommend.
Vamshi Gudipati
@vamshikrishna144
@ashwins93 haven't really gone thru your code but here is my answer on stackO
Ashwin
@ashwins93
@vamshikrishna144 Yeah i came across this when i was googling
i used html-react-parser from npm
Vamshi Gudipati
@vamshikrishna144
that should to the trick too
Ashwin
@ashwins93
But internally it does use dangerouslySetInnerHtml
My doubt is purely academical btw
Vamshi Gudipati
@vamshikrishna144
Then use this
this doesnt use dangerouslySetInnerHtml
Ashwin
@ashwins93
@vamshikrishna144 Thanks! this is exactly what i was looking for. I need to upgrade my googling skills, i wandered for a couple of hours
CamperBot
@camperbot
ashwins93 sends brownie points to @vamshikrishna144 :sparkles: :thumbsup: :sparkles:
:cookie: 5 | @vamshikrishna144 |http://www.freecodecamp.com/vamshikrishna144
Ashwin
@ashwins93
Next time i should check here first i guess
Vamshi Gudipati
@vamshikrishna144
Haha, I use in my project, so I knew. And yes googling is indeed an important skill
B
@B-keen
@sjames1958gm i know that is what the exercise says but i was looking to navigate JSON and try it another way looping through each element if found i.e. if the index id is 2548 prop is artist and artist is Bon Jovi (return collection[id][prop]; ) should equal Bon Jovi in the Free Code Camp window i'm getting the entire JSON but in chrome dev tools i'm getting Bon Jovi

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) {

//var json = JSON.parse(collection);

  //var jkl = collection[id][prop].push(value);

  //var jkl = id;

  return collection[id][prop];
}

// Alter values below to test your code
//updateRecords(5439, "artist", "ABBA");
updateRecords(2548, "artist", "Bon Jovi");


"Bon Jovi"
Chrome
FCC
B
@B-keen
  collection = {
 "1245": {
      "artist": "Robert Palmer",
      "tracks": [ ]
},
    "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"
    }
}
Stephen James
@sjames1958gm
@B-keen Looping is entirely unnecessary, they give you the keys to look up everything
@B-keen You need to test the incoming parameters first then change the collection
B
@B-keen

@sjames1958gm ```
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) {

//var json = JSON.parse(collection);

//var jkl = collection[id][prop].push(value);

//var jkl = id;

if(prop === 'tracks' ){
collection[id][prop].push(value);

}
return collection;
}

// Alter values below to test your code
//updateRecords(5439, "artist", "ABBA");
updateRecords(1245, "tracks", "Addicted to Love");
//updateRecords(2548, "artist", "Bon Jovi");
```

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) {

//var json = JSON.parse(collection);

  //var jkl = collection[id][prop].push(value);

  //var jkl = id;


  if(prop === 'tracks' ){
    collection[id][prop].push(value);


  }
  return collection;
}

// Alter values below to test your code
//updateRecords(5439, "artist", "ABBA");
updateRecords(1245, "tracks", "Addicted to Love");
//updateRecords(2548, "artist", "Bon Jovi");
Stephen James
@sjames1958gm
@B-keen That is one case. But you should probably check the primary case of value != "" first
B
@B-keen
@sjames1958gm i still have the question as to why is the behaviour different in the IDEs when i do a "return collection[id][prop] " i get just that element in chrome dev & node.js but when i do it in FCC it gives me the entire JSON
no problem i will do that Stephen
Stephen James
@sjames1958gm
@B-keen Where are you seeing that it gives you the whole collection
B
@B-keen

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) {

//var json = JSON.parse(collection);

  //var jkl = collection[id][prop].push(value);

  //var jkl = id;

  return collection[id][prop];
}

// Alter values below to test your code
//updateRecords(5439, "artist", "ABBA");
updateRecords(2548, "artist", "Bon Jovi");


"Bon Jovi"
if you put that in Chrome or Node.js it gives you Bon Jovi
but when you run it in FCC it gives you the entire JSON