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
Muhammed Hafiz
@zifahm
Frameworks() needs to map the array to an unordered list, much like in the last challenge. Finish writing the map callback to return an li element for each framework in the frontEndFrameworks array. This time, make sure to give each li a key attribute, set to a unique value.
what i have done is not correct?
geoffrymichael
@geoffrymichael
image.png
whoops, i dont know how this works. Anyway, I was trying to get rid of white space in between my bootstrap navbar and an h1 element placed directly below it.
i named an id to the h1 to hopefully override any bootstrap specificity and then tried to run through anything i could think of to get rid of the top spacing that seems to be the culprit for the h1
image.png
Stephen James
@sjames1958gm
@zifahm You need to return something inside the callback function
@zifahm
return <li key={index}>{value}</li>
Muhammed Hafiz
@zifahm
@sjames1958gm thanks, yeah i realised it later lol
CamperBot
@camperbot
zifahm sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8861 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
@zifahm great, I make that mistake alot
Muhammed Hafiz
@zifahm
@sjames1958gm i am stuck here currently
https://beta.freecodecamp.org/en/challenges/react-and-redux/extract-state-logic-to-redux
const ADD = 'ADD';

const addMessage = (data) => {
  return {
    type:"ADD"
    message:data
  }
}


const messageReducer = (state=[],action) => {
  switch(action.type) {
    case 'ADD':
      return Object.assign({},state,{
        message:action.message
      })
      default:
      return state
  }
}

var store = Redux.createStore(messageReducer)
console says unexpected token near message in action creator
Stephen James
@sjames1958gm
@zifahm Missing comma after "ADD" (also you are supposed to use the variable ADD in place of the string)
Muhammed Hafiz
@zifahm
@sjames1958gm lol
half an hour on this
ahh now the immutable error !!
Dispatching addMessage against the store should immutably add a new message to the array of messages held in state.
wouldn't my reducer work?
Stephen James
@sjames1958gm
@zifahm array of messages
Muhammed Hafiz
@zifahm
got it!
Stephen James
@sjames1958gm
@zifahm :+1:
Muhammed Hafiz
@zifahm
return [...state,array.message]
so the thing i did before what did happen there in the state ? @sjames1958gm
Stephen James
@sjames1958gm
@zifahm well I am thinking you converted state from an array to an object containing an array called state with a extra value called message
{ state: arrayfrombefore, message: newmessage}
Muhammed Hafiz
@zifahm
ohh yeah object !!
getting confused with this and that
:worried:
Stephen James
@sjames1958gm
@zifahm Keep working at it the confusion will lessen (it never completely goes away :) )
Muhammed Hafiz
@zifahm
@sjames1958gm thanks
dinesh
@1532j0004kg
cool & happie evening friends ! :smile:
Stephen James
@sjames1958gm
@1532j0004kg Morning
dinesh
@1532j0004kg
morning there ? :+1:
happie
Stephen James
@sjames1958gm
@1532j0004kg Yep, and a cold one -6 C
dinesh
@1532j0004kg
enjoy :smile:
england ?
Stephen James
@sjames1958gm
Texas
amoraptor91
@amoraptor91
good morning campers
Amit Patel
@AmitP88

hey guys, I'm trying to solve the Title Case A Sentence algorithm and I'm having trouble figuring out why my solution isn't working:

function titleCase(str) {

  var wordsArray = str.split(' ');

  var capitalized = wordsArray.map(function(word) {

    var capWord = word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();

    var newString = capWord.join(" ");

    return newString;

  });



  return capitalized;
}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");

I know my capWord.join method isn't working, but I'm not sure why. What am I doing wrong?

Aditya
@ezioda004
@AmitP88 capWord is a string and .join() is an array method.
Amit Patel
@AmitP88
@ezioda004 but capWord is an array of strings no?
title.png
@ezioda004 the weird thing as well is, when I console.log(capWord), I get an array of null elements in the console
Aditya
@ezioda004
@AmitP88 Nope, capitalized is an array. word is an element of wordsArray array.
word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); you're concatenating 2 strings
Therefore youre storing a string in var capWord
Amit Patel
@AmitP88
oh I see. so I would have to make another function to pass in capitalized as a parameter?
another function to do the joining