React Review Using Props With Stateless Functional Components
Where communities thrive
- Bring together over 1.5M+ people
- Join over 100K+ communities
- Free without limits
- Create your own community
- Explore more communities
Activity
-
Jun xix 2021 12:36
@texas2010 banned @therichaverma
-
May 14 2020 22:39
@bjorno43 banned @minitechtips_twitter
-
May 14 2020 22:38
@bjorno43 banned @real-action
-
February 01 2020 00:27
@bjorno43 banned @Ndoua
-
Jan 07 2020 03:11
@bjorno43 banned @physician-sam
-
Jun xx 2019 21:20
@bjorno43 banned @shenerd140
-
May 10 2019 09:13
@bjorno43 banned @zhaokunhaoa
-
Oct 12 2018 05:l
@bjorno43 banned @NACH74
-
Sep 16 2018 12:21
@bjorno43 banned @yash-kedia
-
Sep 16 2018 12:xv
@bjorno43 banned @vnikifirov
i don't know how to return the value lol
Saudamini Mohapatra
@saudamini91_twitter
howdy
@bjorno43 Available functions:
- Parse Javascript lawmaking and output result (command: assistance javascript)
- Do Javascript challenges (command: aid challenges)
Alright. Hopefully information technology'll go along on running now
@channinghall Y'all should probably join our Help or HelpJavaScript rooms for that. We utilize this room to play JS challenges :)
I really don't think you need Promises to solve this claiming
@mathisme The current claiming is:
Write a function that takes 3 arguments, each representing a RBG decimal value. The function should render the hexadecimal representation of the RGB value.
Rules:
- The name of the office should exist:
rgb. - The valid decimal values for RGB are
0 - 255. - Any (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.
Example:
rgb(255, 255, 255); should return: FFFFFF.
i typed this in notes on my ipad and haven't tested so it might not work lol
@bobsbotty solve
'''
office rgb() {
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(xvi);
}
return hex;
}
'''
@mathisme Delight provide your solution between three backticks.
@bobsbotty solve
part 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(sixteen); } render hex; }
@mathisme There was an error with your Javascript code:
V8Js:: compileString () :three: SyntaxError: Invalid or unexpected token
class Military camp extends React.Component { constructor(props) { super(props); } return() { return ( <div> <Camper/> </div> ); } }; // change code below this line const Camper = props => (<p>{props.name}</p>); Camper.defaultProps = {name: `CamperBot` }; Camper.PropTypes = {name: PropTypes.cord.isRequired }; anyone knows why this code don't pass the tests?
Ghost
@ghost~58713b0fd73408ce4f41eb26
What claiming is it for?
anterior don't pass too and seems to be fine :-(
Ghost
@ghost~58713b0fd73408ce4f41eb26
You have ii problems (ane existent and the other fcc exam beingness picky). The real problem is yous are non using the correct method to define the the propTypes. Y'all take a typo. The other outcome is currently the tests are not recognizing the unmarried backticks every bit a string. Try unmarried or double quotes.
yep just seen , so i cannot pass all the test ?
so this is'south a problem of fcc test no? syntax with single ticks are right
Ghost
@ghost~58713b0fd73408ce4f41eb26
You lot tin pass the tests if y'all change the backticks to unmarried or double quotes and use the correct spelling of the protoTypes method.
const Camper = props => (<p>{props.proper name}</p>); Camper.defaultProps={proper name: `CamperBot`}; Camper.propTypes = {proper name:PropTypes.string.isRequired}; someone knows why don't evaluate?
i cannot meet the type fault
@10vivar May I advise you join our Help and / or HelpJavascript room for these questions? You're much more likely to go an reply there as this room is used for JS Challenges with our Bot @bobsbotty :) Information technology might even exist amend to join our forums
uups i read challenges and thinking it's related to the challenges of the course , there it's s a link to the original purpose of this room ? thx
thanks interesting piece of work ! i suggest you change the name of the room in order to avert more spammers like me ! perchance some related with the git link?
JJ Megma
@megma_jj_twitter
Precious Adeyinka
@precious-adeyinka
Hi
Precious Adeyinka
@precious-adeyinka
Hello @faisaldanan
Source: https://gitter.im/FreeCodeCamp/JavascriptChallenges?at=5bc8b41af659e67772d7f615
0 Response to "React Review Using Props With Stateless Functional Components"
Postar um comentário