myApp.js
file to log \"Hello World\" to the console. CheckUserAge
component should render with a single input
element and a single button
element.');\", \"assert(Enzyme.mount(React.createElement(CheckUserAge)).state().input === '' && Enzyme.mount(React.createElement(CheckUserAge)).state().userAge === '', 'message: The CheckUserAge
component's state should be initialized with a property of userAge
and a property of input
, both set to a value of an empty string.');\", \"assert(Enzyme.mount(React.createElement(CheckUserAge)).find('button').text() === 'Submit', 'message: When the CheckUserAge
component is first rendered to the DOM, the button
's inner text should be Submit.');\", input
element and the button
is clicked, the button
's inner text should read You Shall Not Pass
.'); }; \", \"async () => { const waitForIt = (fn) => new Promise((resolve, reject) => setTimeout(() => resolve(fn()), 250)); const mockedComponent = Enzyme.mount(React.createElement(CheckUserAge)); const initialButton = mockedComponent.find('button').text(); const enter18AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: 18 }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const enter35AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: 35 }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const userAge18 = await enter18AndClickButton(); const userAge35 = await enter35AndClickButton(); assert(initialButton === 'Submit' && userAge18 === 'You May Enter' && userAge35 === 'You May Enter', 'message: When a number greater than or equal to 18 is entered into the input
element and the button
is clicked, the button
's inner text should read You May Enter
.'); }; \", \"async () => { const waitForIt = (fn) => new Promise((resolve, reject) => setTimeout(() => resolve(fn()), 250)); const mockedComponent = Enzyme.mount(React.createElement(CheckUserAge)); const enter18AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: 18 }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const changeInputDontClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: 5 }}); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const enter10AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: 10 }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const userAge18 = await enter18AndClickButton(); const changeInput1 = await changeInputDontClickButton(); const userAge10 = await enter10AndClickButton(); const changeInput2 = await changeInputDontClickButton(); assert(userAge18 === 'You May Enter' && changeInput1 === 'Submit' && userAge10 === 'You Shall Not Pass' && changeInput2 === 'Submit', 'message: Once a number has been submitted, and the value of the input
is once again changed, the button
should return to reading Submit
.'); }; \", input
element and the button
is clicked, the button
's inner text should read You Shall Not Pass
.'); }; \", \"async () => { const waitForIt = (fn) => new Promise((resolve, reject) => setTimeout(() => resolve(fn()), 250)); const mockedComponent = Enzyme.mount(React.createElement(CheckUserAge)); const initialButton = mockedComponent.find('button').text(); const enter18AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: '18' }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const enter35AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: '35' }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const userAge18 = await enter18AndClickButton(); const userAge35 = await enter35AndClickButton(); assert(initialButton === 'Submit' && userAge18 === 'You May Enter' && userAge35 === 'You May Enter', 'message: When a number greater than or equal to 18 is entered into the input
element and the button
is clicked, the button
's inner text should read You May Enter
.'); }; \", \"async () => { const waitForIt = (fn) => new Promise((resolve, reject) => setTimeout(() => resolve(fn()), 250)); const mockedComponent = Enzyme.mount(React.createElement(CheckUserAge)); const enter18AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: '18' }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const changeInputDontClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: '5' }}); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const enter10AndClickButton = () => { mockedComponent.find('input').simulate('change', {target: { value: '10' }}); mockedComponent.find('button').simulate('click'); return waitForIt(() => { mockedComponent.update(); return mockedComponent.find('button').text(); }); }; const userAge18 = await enter18AndClickButton(); const changeInput1 = await changeInputDontClickButton(); const userAge10 = await enter10AndClickButton(); const changeInput2 = await changeInputDontClickButton(); assert(userAge18 === 'You May Enter' && changeInput1 === 'Submit' && userAge10 === 'You Shall Not Pass' && changeInput2 === 'Submit', 'message: Once a number has been submitted, and the value of the input
is once again changed, the button
should return to reading Submit
.'); }; \", \"assert(new RegExp(/(s|;)if(s|()/).test(Enzyme.mount(React.createElement(CheckUserAge)).instance().render.toString()) === false, 'message: Your code should not contain any if/else
statements.');\" ], \"solutions\": ["}
+{"_id":"q-en-freeCodeCamp-06bea0a9405cf6837c7d1a93da700adfeb06c4da6ce8655b51d4bfb05b3d2c1a","text":"# --description-- Once you've earned the following freeCodeCamp certifications, you'll be able to claim The Full Stack Developer Certification: be able to claim the Legacy Full Stack Developer Certification:
data structures
are things that hold data. JavaScript has seven of these. For example, the Number
data structure holds numbers.\", \"Let's learn about the most basic data structure of all: the Boolean
. Booleans can only hold the value of either true or false. They are basically little on-off switches.\", welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked.\" welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked.\" ], \"tests\": [ \"assert(typeof(welcomeToBooleans()) === 'boolean', 'message: The welcomeToBooleans()
function should return a boolean (true/false) value.');\","}
+{"_id":"q-en-freeCodeCamp-242b7ce8067d85cff2d0e9accbd19cb5b7ffba93dc1a3f3dd4359556c7f4475e","text":"Spreadsheet software typically uses `=` at the beginning of a cell to indicate a calculation should be used, and spreadsheet functions should be evaluated. style
Element CSS stehen.\", \"Es gibt noch andere Wege CSS zu überschreiben. Erinnerst du dich an Inline Styles?\", in-line style
um dein h1
Element weiß zu machen. Vergiss nicht, Inline Styles sehen so aus:\", inline style
um dein h1
Element weiß zu machen. Vergiss nicht, Inline Styles sehen so aus:\", \"<h1 style=\"color: green\">
\", \"Lasse die blue-text
und pink-text
Klassen auf deinem h1
Element.\" ]"}
+{"_id":"q-en-freeCodeCamp-24578eceb7ec6bf18b1b975a44a02c75ab5879f66a4ae804a5ed4035e14457fa","text":"## Instructions penguin
class, create a variable name --penguin-skin
and give it a value of gray
penguin
class, create a variable name --penguin-skin
and give it a value of gray
. $.getJSON(\"/json/cats.json\", function(json) { $(\".message\").html(JSON.stringify(json));});\", \"Una vez lo añadas, pulsa el botón \"Get Message\". Su función Ajax sustituirá el texto \"The message will go here\" con la salida JSON en bruto de la API de fotos de gato de Free Code Camp.\" ], \"namePt\": \"Obter um JSON com o método getJSON do jQuery\", \"descriptionPt\": [ \"Também é possivel solicitar os dados de uma fonte externa. É aqui onde as API's entram em jogo. \", \"Lembre que as API's - Interface de Programação de Aplicativos - são ferramentas que os computadores usam para se comunicar entre si.\", \"A maioria das API's transferem de dados para web em um formato chamado JSON. JSON significa notação de objeto JavaScript (JavaScript Object Notation).\", \"Você já usou JSON para criar objetos em JavaScript. O JSON não é mais que as propriedades de um objeto e seus valores atuais, separados entre
{
e um }
. \", \"Estas propriedades e seus valores são muitas vezes denominados de \" pares chave-valor\".\", \"Vamos obter o JSON da API de fotos de gatos do Free Code Camp.\", \"Aqui esta o código que você pode por no nosso evento de clique para fazer isso:\", \"$.getJSON(\"/json/cats.json\", function(json) { $(\".message\").html(JSON.stringify(json));});\", \"Uma vez adicionadas, aperte o botão \"Get Message\". Sua função Ajax substituirá o texto \"The message will go here\" com a saída bruta do JSON da API de gatos do Free Code Camp.\" ] }, {"} +{"_id":"q-en-freeCodeCamp-2bcea5235dd77775c0f6cf2f7551d4b4f5418fc84a25252ec2f6d9ab4d19b8cb","text":"Your `for` loop should use `i < count` as the condition. ```js
Bracket notation
is a way to get a character at a specific index
within a string.\", \"Computers don't start counting at 1 like humans do. They start at 0.\", \"For example, the character at index 0 in the word \"Charles\" is \"C\". So if var firstName = \"Charles\"
, you can get the value of the first letter of the string by using firstName[0]
.\", bracket notation
to find the first character in a the firstLetterOfLastName
variable.\", bracket notation
to find the first character in the firstLetterOfLastName
variable.\", \"Try looking at the firstLetterOfFirstName
variable declaration if you get stuck.\" ], \"tests\": ["}
+{"_id":"q-en-freeCodeCamp-2e0dc47e42c1ee5317c7d9794ea24f800404b188ade060b613acb545735cf260","text":">
) compares the values of two numbers. If the number to the left is greater than the number to the right, it returns true
. Otherwise, it returns false
.>
) compares the values of two numbers. If the number to the left is greater than the number to the right, it returns true
. Otherwise, it returns false
.\", \"Like the equality operator, greater than operator will convert data types of values while comparing.\", \"Examples\", \"5 > 3 // true\", \"
7 > '3' // true
2 > 3 // false
'1' > 9 // false
style
element.\", style
element.\", \"But wait. There's one last way to override CSS. This is the most powerful method of all. But before we do it, let's talk about why you would ever want to override CSS.\", \"In many situations, you will use CSS libraries. These may accidentally override your own CSS. So when you absolutely need to be sure that an element has specific CSS, you can use !important
\", pink-text
class declaration. Remember that our pink-text
class was overridden by subsequent class declarations, id declarations, and in-line styles.\", pink-text
class declaration. Remember that our pink-text
class was overridden by subsequent class declarations, id declarations, and inline styles.\", \"Let's add the keyword !important
to your pink-text element's color declaration to make 100% sure that your h1
element will be pink.\", \"An example of how to do this is:\", \"color: red !important;
\""}
+{"_id":"q-en-freeCodeCamp-38a6a802464e3445a100d1fdf71b80962adc622af86095c67fa71dfb0dfd2464","text":"dragAndDrop: true, lightbulb: { enabled: false myRegex
should return false
for the string Franklin Rosevelt
testString: myRegex.lastIndex = 0; assert(!myRegex.test('Franklin Rosevelt')); - text: Your regex myRegex
should return false
for the string Frank Roosevelt
testString: myRegex.lastIndex = 0; assert(!myRegex.test('Frank Roosevelt')); - text: You should use .test()
to test the regex. testString: assert(code.match(/myRegex.test(s*myStrings*)/)); - text: Your result should return true
."}
+{"_id":"q-en-freeCodeCamp-3ab189227bfaac4575acc24937339819e93deadb178a20b0bc0a5c7b02344028","text":"Quincy Larson
Executive Director, freeCodeCamp.org
{t('certification.executive')}
Verify this certification at {certURL}
{t('certification.verify', { certURL: certURL })}
checkObj({city: \"Seattle\"}, \"district\")
should return \"Not Found\"
.' testString: 'assert(checkObj({city: \"Seattle\"}, \"district\") === \"Not Found\");' - text: 'checkObj({pet: \"kitten\", bed: \"sleigh\"}, \"gift\")
should return \"Not Found\"
.' testString: 'assert(checkObj({pet: \"kitten\", bed: \"sleigh\"}, \"gift\") === \"Not Found\");' ``` "}
+{"_id":"q-en-freeCodeCamp-422b7b731c2be16583751f2552d7f005f207bf536410ecebf4d827b2faa2184c","text":"```js // multiplies the first input value by the second and returns it const multiplier = (item, multi) => item * multi; multiplier(4, 2); // returns 8 ``` "}
+{"_id":"q-en-freeCodeCamp-4315f1d4d55a1ffc13affa777cdf6178c5dfdf384b1f68edd0b1c04849c012b3","text":"void fastify.register(devLoginCallback, { prefix: '/auth' }); } void fastify.register(settingRoutes); void fastify.register(deprecatedEndpoints); return fastify; };"}
+{"_id":"q-en-freeCodeCamp-4457a792509374fb5e348eb147f2e4bee40c17f71b5e4ddcf35f120691c63af1","text":"selectionHighlight: false, overviewRulerBorder: false, hideCursorInOverviewRuler: true, \"Yes\"
if val
is less than or equal to 50
and greater than or equal to 25
. Otherwise, will return \"No\"
. \"Yes\"
if val
is less than or equal to 50
and greater than or equal to 25
. Otherwise, will return \"No\"
. message
cambie para decir \"Here is the message\".\", \"Podemos hacerlo añadiendo el siguiente código dentro de nuestro evento de pulsación:\", \"$(\".message\").html(\"Here is the message\");
\" ], \"namePt\": \"Mundando texto com eventos de clique\", \"descriptionPt\": [ \"Quando nosso evento de clique ocorre, podemos utilizar o Ajax para atualixar um elemento HTML\", \"Vamos fazer que quando um usuário clicar no botão \"Get Message\", o texto do elemento com a classe message
passe a dizer \"Here is the message\".\", \"Podemos fazer isso adicionando o seguinte código dentro do nosso evento de clique:\", \"$(\".message\").html(\"Here is the message\");
\" ] }, {"}
+{"_id":"q-en-freeCodeCamp-52c36d0cb49026c6e252e7b9df71672889ec5f8ae22712cf9d761764e3780348","text":"transform: translateY(-50%); } .landing-skill-icon { color: #215f1e; font-size: 150px; } .black-text { color: #333; font-weight: 400; font-size: 40px; } .font-awesome-padding { margin-top: 45px; margin-bottom: 20px; } .background-svg { width: 220px; height: 220px;"}
+{"_id":"q-en-freeCodeCamp-53bef0bfb230260c32916879e28837cd1f59e0199e7b97398a9d0930172992da","text":"\"invalid-protocol\": \"La URL debe comenzar con http o https\", \"url-not-image\": \"URL debes enlazar directamente a un archivo de imagen\", \"use-valid-url\": \"Utiliza un URL válido\" }, \"certification\": { \"certifies\": \"Spanish: This certifies that\", \"completed\": \"Spanish: has successfully completed the freeCodeCamp.org\", \"developer\": \"Spanish: Developer Certification, representing approximately\", \"executive\": \"Spanish: Executive Director, freeCodeCamp.org\", \"verify\": \"Spanish: Verify this certification at {{certURL}}\", \"issued\": \"Spanish: Issued\" } }"}
+{"_id":"q-en-freeCodeCamp-5514e221ee48a3d221fae75d82fd1c72ad9109a47e1322283be5720244fefd9d","text":"Similar to how the tilde we learned about in the last challenge allows npm to install the latest PATCH for a dependency, the caret (`^`) allows npm to install future updates as well. The difference is that the caret will allow both MINOR updates and PATCHes.