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
John Nunns
ok, just making sure nothing inside ()
Tyler Moeller
John Nunns
function getCount(str) {
  return (str.match(/[aeiou]/ig)||[]).length;
that was the highest rated one btw
do you know what the ig mean?
Tyler Moeller

This was my version:

function getCount(str) {
  var vowelCount = 0;
  str.split('').map(val => {if (val.match(/[aeiou]/i)) vowelCount++});
  return vowelCount;

I like the one you gave better

Matt Kieffer
@ronit looks like you just added http in from of that image link. That will not work. For testing, copy the same image URL that you are using in CSS / header and paste it in the CSS / main. This was you can see the image work. Then upload the image you want and link it.
Tyler Moeller
@johnnunns the ig means ignore case and evaluate all characters in the string (g = global)
@luna9 thx!
rfried99 sends brownie points to @luna9 :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @luna9 |http://www.freecodecamp.com/luna9
Can somebody help me here please? How do I do for the transcurrido div to be in the center of the circle? http://codepen.io/zarruk/pen/VPWrWL?editors=1010
John Nunns
@TylerMoeller still on?
JD Tadlock
@johnnunns need some help?
John Nunns
Yeah man! @jdtdesigns
You've already solved it though haha
sounds fun I'm sure! :)
but with the knowledge gained from the recent codewars problem I just did, I was hoping for some direction
function getCount(str) {
var sum=0
var i = str.split('');
for(var x=0; x<i.length; x++){
if (i[x] === 'a' || i[x] === 'e' || i[x] === 'i' || i[x] === 'o' || i[x] === 'u'){
sum ++;


return sum;

so I just wrote this function in order to count the vowels
it works well, it could be condensed I saw from the other answers, but it works
Now, back to that prep course challenge, I'm hoping to apply this knowledge to it
JD Tadlock
@zarruk All the very high margins are screwing with your layout. I cleaned up some of the html and changed some css http://codepen.io/jdtadlock/pen/wgeyeB?editors=0100
John Nunns
Instructions from your teacher:
Write a function called "countAllCharacters".

Given a string, "countAllCharacters" returns an object where each key is a character in the given string. The value of each key should be how many times each character appeared in the given string.

* If given an empty string, countAllCharacters should return an empty object.

var output = countAllCharacters('banana');
console.log(output); // --> {b: 1, a: 3, n: 2}

Starter Code :
function countAllCharacters(str) {
  // your code here
JD Tadlock
still doesn't work i see
do you have a link to the challenge?
John Nunns
so the code I just posted above was the answer to a codewars problem
different but similar
that one works to count vowels
but after doing that I thought why not give a go at the prep course one, which I have not written code for as yet
Coding Machine
Hello, I am recruiting people to work a project with the skills of HTML and CSS also Javascript. If you think your the right canidate, join : https://gitter.im/Project-Awesome-1/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link
JD Tadlock
@johnnunns My answer is still failing or are you wanting to solve it yourself? @johnnunns
John Nunns
well when i looked at your answer, I realized I was pretty far from solving it myself
I may be a little closer now
I believed you used regex correct?
JD Tadlock
@johnnunns Yep
and .reduce()
and .map() i believe
John Nunns
you know what, let me rewatch those higher level function vids you showed me. and then also watch one on regex
JD Tadlock
for regex, you'll just google 'match blah blah' most of the time
John Nunns
is match and regex the same method?
JD Tadlock
i google regex all the time cause i'm not going to spend time figuring out the expression myself if i know it's been done 1000 times
.match() uses regex to 'match' a certain pattern in a string
@zarruk I had a go at your code too: http://codepen.io/JohnnyBizzel/pen/qRjxWp
How can I import a picture from facebook can anybody help me please.
John Nunns
@jdtdesigns alright jd
gonna need some clarification :)
so I'm trying to apply map to my function