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
Zheng
@FireFalcon1155
asking like an idiot
hold on
Moisés Man
@moigithub
@LisaRamos numbers do NOT have indexOf method.. only strings and arrays
Will Hurley
@wjhurley
@LisaRamos this might help, but be careful because the answer is included further down the page https://github.com/FreeCodeCamp/freecodecamp/wiki/Algorithm-roman-numeral-converter
Zheng
@FireFalcon1155
@moigithub do I do this .trim() or this? .trim("");
Moisés Man
@moigithub
@FireFalcon1155 mdn.io/trim <--
beginnerdidi
@beginnerdidi
I am stuck. How do I assign the contents of a to variable b?
var a = 7;
var b = 7;
Will Hurley
@wjhurley
@beginnerdidi var b = a; after you have declared a
beginnerdidi
@beginnerdidi
Let me try. @wjhurley
Thank you. @wjhurley It worked but I still don't understand it.
CamperBot
@camperbot
beginnerdidi sends brownie points to @wjhurley :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @wjhurley |http://www.freecodecamp.com/wjhurley
errosc
@errosc
@beginnerdidi var b = a; means that anything that is in variable a is now assigned to b
@beginnerdidi lets say a = 5. When you do var b = a, a is holding the value of 5
Zheng
@FireFalcon1155

so this is what I noticed

whenever i'm face to face with a problem, i can't seem to solve it no matter how hard i try without someone's help. even then i struggle.

what do i do?

ronaldrdguez
@ronaldrdguez
break it up
beginnerdidi
@beginnerdidi
Ok thank you so much for explaining @errosc , I read it again and again and again it made sense...
CamperBot
@camperbot
beginnerdidi sends brownie points to @errosc :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for errosc
Ryan Malm
@Rybar
Anyone available to help me destroy a bug? http://ryanmalm.com/js13k/
the blue box should collide with the red box. They're the only two entities present, render correctly but won't collide. Ideas?
CompGeekGirl
@LisaRamos
This message was deleted
@wjhurley Now how can I fix this unexpected end of input I got in this Roman Numeral Converter exercise?
function convertToRoman(num) {
  var decimalValues = [1000, 900, 500];
  var romanNumerals = ['M', 'CM', 'D'];

  var romanized = '';

  for (i = 0; i < values.length; i++) {
    while (values[i] <= num) {
      romanized + romanNumerals[i];
      num -= value[i];
  }
 return num;
}

convertToRoman(36);
Ryan Malm
@Rybar
@LisaRamos the problem is with the statement romanized + romanNumerals[i]; should be romanized += romanNumerals[i]
CompGeekGirl
@LisaRamos
@Rybar I changed that part but I still got the same unexpected end of input message.
Moisés Man
@moigithub
@LisaRamos i < values.length; whats values ?? i dont see u have that declared
CompGeekGirl
@LisaRamos
@moigithub Now how do I declare that?
Moisés Man
@moigithub
@LisaRamos dont know what values is supposed to be
CompGeekGirl
@LisaRamos
@moigithub I think I messed up that one.
Moisés Man
@moigithub
probably values should be decimalValues ???? @LisaRamos
Ryan Malm
@Rybar
@LisaRamos yes, neither value or values is declared
CompGeekGirl
@LisaRamos
@moigithub I fixed it but it's not running. Have I done anything wrong?
function convertToRoman(num) {
  var decimalValues = [1000, 900, 500];
  var romanNumerals = ['M', 'CM', 'D'];

  var romanized = '';

  for (i = 0; i < decimalValues.length; i++) {
    while (decimalValues[i] <= num) {
      romanized + romanNumerals[i]
      num -= decimalValues[i];
  }
 return num;
}

convertToRoman(36);
Ryan Malm
@Rybar
you're returning the wrong var... take another look
Moisés Man
@moigithub
:point_up: August 27, 2016 8:03 PM <--- check that @LisaRamos
Ryan Malm
@Rybar
and you'll need a few more array entries for both of your number tables for it to work for all numbers
and, you're still not doing +=, like @moigithub pointed out.
jonkiote
@jonkiote
On the "Profile Lookup" exercise, would it be cheating if you explicitly check the prop variable against "firstName", "lastName", "number", and "likes"? I feel like I'm supposed to iterate through the properties.
Moisés Man
@moigithub
if it works.. and make ur life easier.. why not :) @Jonkiote
jonkiote
@jonkiote
Okay, haha.
thanks @moigithub
CamperBot
@camperbot
jonkiote sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 2028 | @moigithub |http://www.freecodecamp.com/moigithub
CompGeekGirl
@LisaRamos
@Rybar Now how is this code? I know it's still not going through.
function convertToRoman(num) {
  var decimalValues = [ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 ];
  var romanNumerals = [ 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I' ];

  var romanized = '';

  for (var i = 0; i < decimalValues.length; i++) {
    while (decimalValues[i] <= num) {
      romanized += romanNumerals[i]
      num -= decimalValues[i];
  }
 return num;
}

convertToRoman(36);
Moisés Man
@moigithub
:point_up: August 27, 2016 8:07 PM << that too :) @LisaRamos
u should return the roman number instead (at that point propbably num will be 0 cuz all substractions )
looks good except for the return statement. @LisaRamos
CompGeekGirl
@LisaRamos
@Rybar Now what do I do with the return statement?
Joseph
@revisualize
@LisaRamos You're almost doing it the same way that I did it.
Ryan Malm
@Rybar
look at what you're returning. Is num what you've been modifying in your loop? Is it the answer the problem is looking for?