Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
commit
2f74b3f795
|
@ -368,14 +368,14 @@
|
|||
"description": [
|
||||
"",
|
||||
"in JavaScript we can can work with decimal numbers",
|
||||
"Let's create a variable <code>myfloat</code> and give it a decimal value."
|
||||
"Let's create a variable <code>myDecimal</code> and give it a decimal value."
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(){if(typeof(myDecimal) != 'undefined' && typeof(myDecimal) == 'number' && editor.getValue().match(/\\./g).length >=2){return(true);}else{return(false);}})(), 'myFloat should be a decimal point number');"
|
||||
"assert((function(){if(typeof(myDecimal) != 'undefined' && typeof(myDecimal) == 'number' && editor.getValue().match(/\\./g).length >=2){return(true);}else{return(false);}})(), 'myDecimal should be a decimal point number');"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"//var ourDecimal = 5.7",
|
||||
"//Create a number with a decimal point here called myFloat",
|
||||
"//Create a number with a decimal point here called myDecimal",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -448,7 +448,7 @@
|
|||
"Let's now go create a nested array called <code>myArray</code>"
|
||||
],
|
||||
"tests":[
|
||||
"assert((function(){if(typeof(myArray) !== 'undefined' && typeof(myArray) === 'object' && typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) === 'object' && editor.getValue().match(/[[]]/g).length >= 1){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
|
||||
"assert((function(){if(typeof(myArray) !== 'undefined' && typeof(myArray) === 'object' && typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) === 'object' && editor.getValue().match(/\\[\\[/g).length >= 1 && editor.getValue().match(/\\]\\]/g).length >= 1){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
"var myArray = [];",
|
||||
|
|
|
@ -1528,7 +1528,8 @@
|
|||
" <li>cat nip</li>",
|
||||
" <li>laser pointers</li>",
|
||||
" <li>lasagna</li>",
|
||||
"</ul>"
|
||||
"</ul>",
|
||||
"<p>Top 3 things cats hate:</p>"
|
||||
],
|
||||
"challengeType": 0,
|
||||
"nameCn": "",
|
||||
|
@ -1561,7 +1562,7 @@
|
|||
"Create an <code>input</code> element of type \"text\" below your lists."
|
||||
],
|
||||
"tests": [
|
||||
"assert($('input').length > 0, 'Your app should have a text field input element.')"
|
||||
"assert($('input[type=text]').length > 0, 'Your app should have a text field input element.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||
|
@ -2150,7 +2151,7 @@
|
|||
"Set the first of your radio buttons and the first of your checkboxes to both be checked by default."
|
||||
],
|
||||
"tests": [
|
||||
"assert($('input[type=\"radio\"]').prop('checked'), 'Your first radio button on your form should be checked by default.');",
|
||||
"assert($('input[type=\"radio\"]').prop('checked'), 'Your first radio button on your form should be checked by default.')",
|
||||
"assert($('input[type=\"checkbox\"]').prop('checked'), 'Your first checkbox on your form should be checked by default.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
|
@ -2738,7 +2739,7 @@
|
|||
"An element's <code>margin</code> controls the amount of space between an element's <code>border</code> and surrounding elements.",
|
||||
"If you set an element's <code>margin</code> to a negative value, the element will grow larger.",
|
||||
"Try to set the <code>margin</code> to a negative value like the one for the red box.",
|
||||
"Change the <code>margin</code> of the green box to a negative value, so it fills the entire horizontal width of the yellow box around it."
|
||||
"Change the <code>margin</code> of the green box to -15 pixels, so it fills the entire horizontal width of the yellow box around it."
|
||||
],
|
||||
"tests": [
|
||||
"assert($('.green-box').css('margin-top') === '-15px', 'Your <code>green-box</code> class should give elements -15px of margin.')"
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
],
|
||||
"tests": [
|
||||
"assert($('.well').hasClass('animated') && $('.well').hasClass('shake'), 'Use the jQuery <code>addClass()</code> function to give the classes \"animated\" and \"shake\" to all your elements with the class \"well\".')",
|
||||
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
|
||||
"assert(!editor.match(/class\\.\\*animated/g), 'Only use jQuery to add these classes to the element.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"fccss",
|
||||
|
@ -630,8 +630,8 @@
|
|||
],
|
||||
"tests": [
|
||||
"assert($('#left-well').css('background-color') === 'rgb(255, 0, 0)', 'Your \"target1\" element should have red text.')",
|
||||
"assert(!editor.match(/\\.parent\\(\\)\\.css/g), 'You should use the <code>parent()</code> function to modify this element.')",
|
||||
"assert(!editor.match(/<div class=\\'well\\' id=\\'left-well\\'>/g), 'Only use jQuery to add these classes to the element.')"
|
||||
"assert(editor.match(/\\.parent\\(\\)\\.css/g), 'You should use the <code>parent()</code> function to modify this element.')",
|
||||
"assert(editor.match(/<div class=\\'well\\' id=\\'left-well\\'>/g), 'Only use jQuery to add these classes to the element.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"fccss",
|
||||
|
|
Loading…
Reference in New Issue