Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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
Ismail Hozain
hey could anyone help me deploy something to the web with surge from my computer
i am having issues with it because it is not showing up on the web
but it says it worke
but it wont let me clik on the link in my command prompt

hellow fam
i got the solution correct now
but i have a question
my first solution is this. i got the requirements correct except for the other one.
bob instanceof Person should return true. im getting this incorrect.

my first solution:

 /*var first = firstAndLast.split(' ')[0];
    var last = firstAndLast.split(' ')[1];

    return  {
      getFullName: function() {
        var fullName = first + ' ' + last;
        return fullName;

      getFirstName: function() {
        return first;

      getLastName: function() {
        return last;

      setFirstName: function(newFirst) {
         first = newFirst;

      setLastName: function(newLast) {
         last = newLast;

      setFullName: function(newFullname) {
        first = newFullname.split(' ')[0];
        last = newFullname.split(' ')[1];
         //firstAndLast = newFullname;

var bob = new Person('Bob Ross');

but on my 2nd solution
this is my 2nd solution i got everything correct. i just used the .this keyword. i dont know why. i just followed the given sample that was initialize

var Person = function(firstAndLast) {

    var fname = firstAndLast.split(' ')[0];
    var lname = firstAndLast.split(' ')[1];

    //Complete the method below and implement the others similarly
    this.getFullName = function() {
      var fullname = fname + ' ' + lname;
      return fullname;

    this.getFirstName = function() {
      return fname;

    this.getLastName = function() {
      return lname; 

    this.setFirstName = function(newFirst) {
      fname = newFirst;

    this.setLastName = function(newLast) {
      lname = newLast;

    this.setFullName = function(newFull) {
      fname = newFull.split(' ')[0];
      lname = newFull.split(' ')[1];


var bob = new Person('Bob Ross');
bob.setFullName('bruh haa');
Ismail Hozain
hmm interesting
Bhoomi Khanderia
Hi ! I am trying to implement bootstrap navbar. I want my logo to be center aligned which I am not able to achieve. Can anyone please suggest the solution. Please check my code: https://codepen.io/Bhoomi/pen/QqKRQm
@Bhoomi-Github It depends on how you want it to look. You might try this suggestion
guys in this code i cant access to body. i just wanna change the background-color: black; or something but it doesnt work
please help me
Try putting all code in <div> tag and add class with bg color component there
It Might work
what div?
<div class="container-fluid">
<h1 class="header">Travis<span><img class="mainPicture" src="https://ih0.redbubble.net/image.398989678.9673/ap,550x550,12x12,1,transparent,t.u1.png"></span>Scott</h1>

In 2nd line, Div tag
Add another class xyz
Set background-color property of xyz to black or whatever colour u want
Kent Saeteurn

hello, can anyone explain to me why "\n" works in one instance, but not the other?

this works:

"using newline in this manner" + "\n" +
"successfully adds a new line to this string"

however, this doesn't...

var name = SomeObjectImWorkingWith.name;
"hi, my name is " + name + "\n" +
"what is yours?"
the 2nd example, \n is literally just concatenated onto the string. why?
Kent Saeteurn
determined the reason; it seems \n doesn't work on returns; now the question is, why? and how to get it to work on returns
how can I make a variable add the same value to itself in a while loop without doubling up? for example: size = 2 I want 2+2+2+2, add to each loop, not 2+2= 4 then 4+4=8 then 8+8= 16…. if that makes any sense lol
Fabien SHAN
@sansae Can you try with \n instead of \n?
@rafaelmonroy Multiply the value by a loop variable?
this is going to take somewhile for me :(
@X140hu4 the multoplication is what I am trying to avoid, I just want the addition, but since the vairable updates through each loop it adds new value to itself
Fabien SHAN
You would need another variable then
@X140hu4 yeah thats what Im trying right now, thanks! hopefully I can get it to work!
rafaelmonroy sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @x140hu4 |http://www.freecodecamp.com/x140hu4
@X140hu4 it worked, man hours of my life GONE! lmao feels right :)
Syed Sadiq ali
how to know what fonts to use ?
can someone help me thanks
I was finally able to figure this one out… can someone look at my comments(logic) in my code and tell me if that is accurate? The only thing I really want to know is: if by setting my size2 variable equal to size.. does that always keep it constant? thats how I wrote it out in the comments and it made sense, i just want to double check.. thanks

function chunkArrayInGroups(arr, size) { 

  var holder = [];                    //[], [[0,1]], [[0,1],[2,3]], [[0,1],[2,3], [4,5]], [[0,1],[2,3], [4,5], [6,7]], [[0,1],[2,3], [4,5], [6,7], [8]]
  var i = 0;                          //0, 2, 4, 6, 8, 10
  var size2 = size;                   //2, 2, 2, 2, 2, 2

  while (i<arr.length){               //0<9?yes, 2<9?yes, 4<9?yes, 6<9? yes, 8<9?yes, 10<9? NO! stop loop, return final holder value...

    holder.push(arr.slice(i, size));  //[0,1],[2,3], [4,5], [6,7], [8],

    i = size;                          //2, 4, 6, 8, 10

    size = size2 + size;               //2+2=4, 2+4=6, 2+6=8, 2+8=10, 2+10=12,


  return holder;


chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2);
@linkin-park that is a design choice are you trying to mimic Facebook design?
@X140hu4 is the logic written out in my comments correct? does size2 stay constant through the loops? even tho size is update each loop?
yes @heroiczero
@linkin-park that site tells you what font they use for each device
Facebook Font
Windows: Segoe UI (or Tahoma for older versions of Windows)
macOS: San Francisco
iOS: San Francisco
Android: Roboto
thanks i was looking at the link
need to do this in 3 hours from now thinking :(
@rafaelmonroy i++ missing i think?
its hard to find the colors @heroiczero
only way i can find is lookin at the soruce