Fcc React Review Using Props With Stateless Functional Components

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your ain community
  • Explore more communities

Action

  • Jun 19 2021 12:36

    @texas2010 banned @therichaverma

  • May 14 2020 22:39

    @bjorno43 banned @minitechtips_twitter

  • May 14 2020 22:38

    @bjorno43 banned @real-action

  • Feb 01 2020 00:27

    @bjorno43 banned @Ndoua

  • Jan 07 2020 03:11

    @bjorno43 banned @md-sam

  • Jun 20 2019 21:twenty

    @bjorno43 banned @shenerd140

  • May ten 2019 09:13

    @bjorno43 banned @zhaokunhaoa

  • Oct 12 2018 05:fifty

    @bjorno43 banned @NACH74

  • Sep 16 2018 12:21

    @bjorno43 banned @yash-kedia

  • Sep 16 2018 12:15

    @bjorno43 banned @vnikifirov

i don't know how to return the value lol

Saudamini Mohapatra

@saudamini91_twitter

hi

@bjorno43 Available functions:

  • Parse Javascript code and output result (command: help javascript)
  • Do Javascript challenges (command: help challenges)

Alright. Hopefully it'll keep on running at present

@channinghall You should probably join our Assist or HelpJavaScript rooms for that. We use this room to play JS challenges :)

I really don't think y'all need Promises to solve this claiming

@mathisme The current challenge is:
Write a function that takes 3 arguments, each representing a RBG decimal value. The function should return the hexadecimal representation of the RGB value.

Rules:

  • The name of the function should be: rgb.
  • The valid decimal values for RGB are 0 - 255.
  • Whatsoever (r,g,b) argument values that autumn out of that range should be rounded to the closest valid value.
  • The hexadecimal representation must be upper case.

Instance:
rgb(255, 255, 255); should return: FFFFFF.

i typed this in notes on my ipad and oasis't tested so information technology might not work lol

@bobsbotty solve

'''
function rgb() {
var hex = '';
for (a = 0; a < three; a++)
{
if (arguments[a] < 0) {arguments[a] = 0;}
else if (arguments[a] > 255) {arguments[a] = 255;}
hex += Math.circular(arguments[a]).toString(16);

}
return hex;
}
'''

@mathisme Please provide your solution between 3 backticks.

@bobsbotty solve

                                                                  function                        rgb(r, g, b)                      {                      var                      hex = '';                      for                      (a =                      0; a <                      3; a++)  {                      if                      (arguments[a] <                      0) {arguments[a] =                      0;}                      else                      if                      (arguments[a] >                      255) {arguments[a] =                      255;}    hex +=                      Math.round(arguments[a]).toString(16);  }                      return                      hex; }                  

@mathisme There was an fault with your Javascript code:

                    V8Js::                        compileString                        ()                      :3: SyntaxError: Invalid or unexpected token                  

                                                                  class                        Campsite                                                  extends                                                React.Component                        {                      constructor(props) {                      super(props);   }   render() {                      return                      (       <div>         <Camper/>       </div>     );   } };                      // change lawmaking below this line                      const                      Camper                      = props => (<p>{props.name}</p>);                      Camper.defaultProps = {name: `CamperBot` };                      Camper.PropTypes                      = {proper noun:                      PropTypes.string.isRequired };                  

anyone knows why this code don't pass the tests?

Ghost

@ghost~58713b0fd73408ce4f41eb26

What challenge is information technology for?

anterior don't pass too and seems to exist fine :-(

Ghost

@ghost~58713b0fd73408ce4f41eb26

Y'all have two bug (i existent and the other fcc examination existence picky). The real problem is yous are not using the correct method to define the the propTypes. You have a typo. The other effect is currently the tests are not recognizing the single backticks equally a string. Try single or double quotes.

yep just seen , so i cannot pass all the exam ?

and so this is's a problem of fcc test no? syntax with single ticks are right

Ghost

@ghost~58713b0fd73408ce4f41eb26

You lot can pass the tests if y'all change the backticks to unmarried or double quotes and utilise the correct spelling of the protoTypes method.

                                          const                      Camper = props => (<p>{props.name}</p>); Camper.defaultProps={name:                      `CamperBot`}; Camper.propTypes = {proper noun:PropTypes.cord.isRequired};                  

someone knows why don't evaluate?

i cannot run across the type mistake

@10vivar May I suggest you join our Help and / or HelpJavascript room for these questions? You're much more probable to get an answer there as this room is used for JS Challenges with our Bot @bobsbotty :) Information technology might fifty-fifty exist better to join our forums

uups i read challenges and thinking it's related to the challenges of the form , there it'south s a link to the original purpose of this room ? thx

thanks interesting work ! i suggest you modify the name of the room in order to avoid more spammers like me ! maybe some related with the git link?

JJ Megma

@megma_jj_twitter

Precious Adeyinka

@precious-adeyinka

Hi

Precious Adeyinka

@precious-adeyinka

How-do-you-do @faisaldanan

minorlify1942.blogspot.com

Source: https://gitter.im/FreeCodeCamp/JavascriptChallenges?at=5bc8b41af659e67772d7f615

0 Response to "Fcc React Review Using Props With Stateless Functional Components"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel