diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index d859b185b9..3be431ae7a 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -368,14 +368,14 @@ "description": [ "", "in JavaScript we can can work with decimal numbers", - "Let's create a variable myfloat and give it a decimal value." + "Let's create a variable myDecimal 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 myArray" ], "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 = [];", diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index 793ef6f8ce..7cbb0d11c7 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -1528,7 +1528,8 @@ "
  • cat nip
  • ", "
  • laser pointers
  • ", "
  • lasagna
  • ", - "" + "", + "

    Top 3 things cats hate:

    " ], "challengeType": 0, "nameCn": "", @@ -1561,7 +1562,7 @@ "Create an input 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": [ "", @@ -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 margin controls the amount of space between an element's border and surrounding elements.", "If you set an element's margin to a negative value, the element will grow larger.", "Try to set the margin to a negative value like the one for the red box.", - "Change the margin of the green box to a negative value, so it fills the entire horizontal width of the yellow box around it." + "Change the margin 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 green-box class should give elements -15px of margin.')" diff --git a/challenges/jquery-ajax-and-json.json b/challenges/jquery-ajax-and-json.json index 53674a7280..92509ffade 100644 --- a/challenges/jquery-ajax-and-json.json +++ b/challenges/jquery-ajax-and-json.json @@ -112,7 +112,7 @@ ], "tests": [ "assert($('.well').hasClass('animated') && $('.well').hasClass('shake'), 'Use the jQuery addClass() 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 parent() function to modify this element.')", - "assert(!editor.match(/
    /g), 'Only use jQuery to add these classes to the element.')" + "assert(editor.match(/\\.parent\\(\\)\\.css/g), 'You should use the parent() function to modify this element.')", + "assert(editor.match(/
    /g), 'Only use jQuery to add these classes to the element.')" ], "challengeSeed": [ "fccss",