fix storage and reset functionality for js and html challenge views

pull/18182/head
Quincy Larson 2015-07-31 13:37:06 -07:00
parent 3c61c96751
commit b75a8e3138
2 changed files with 6 additions and 7 deletions

View File

@ -121,7 +121,7 @@
"For example, if we created a variable <code>var firstName = \"Julie\"</code>, we could find out how long the string \"Julie\" is by using the <code>firstName.length</code> property." "For example, if we created a variable <code>var firstName = \"Julie\"</code>, we could find out how long the string \"Julie\" is by using the <code>firstName.length</code> property."
], ],
"tests": [ "tests": [
"(function(){if(typeof(lastNameLength) != 'undefined' && typeof(lastNameLength) == 'number' && lastNameLength == 4){return(true);}else{return(false);}})(), 'lastNameLength should be equal to four')()" "assert((function(){if(typeof(lastNameLength) != 'undefined' && typeof(lastNameLength) == 'number' && lastNameLength == 4){return(true);}else{return(false);}})(), 'lastNameLength should be equal to four')"
], ],
"challengeSeed": [ "challengeSeed": [
"var firstName = \"Madeline\";", "var firstName = \"Madeline\";",
@ -368,20 +368,19 @@
"description": [ "description": [
"", "",
"in JavaScript we can can work with decimal numbers", "in JavaScript we can can work with decimal numbers",
"These decal numbers are known as floats.", "Let's create a variable <code>myfloat</code> and give it a decimal value."
"Let's create a float now called myFloat and give it a value"
], ],
"tests": [ "tests": [
"assert((function(){if(typeof(myFloat) != 'undefined' && typeof(myFloat) == '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);}})(), 'myFloat should be a decimal point number');"
], ],
"challengeSeed": [ "challengeSeed": [
"//var ourFloat = 5.7", "//var ourDecimal = 5.7",
"//Create a number with a decimal point here called myFloat", "//Create a number with a decimal point here called myFloat",
"", "",
"", "",
"", "",
"", "",
"if(typeof(myFloat) != 'undefined'){(function(z){return(z);})(myFloat);}" "(function(){if(typeof(myDecimal) != 'undefined'){return(myDecimal);}})();"
], ],
"challengeType": 1 "challengeType": 1
}, },

View File

@ -763,7 +763,7 @@
}, },
{ {
"id": "bad87fee1348bd9aecc08826", "id": "bad84fee1348bd9aecc08826",
"name": "Waypoint: Read Data from an Element Using jQuery", "name": "Waypoint: Read Data from an Element Using jQuery",
"dashedName": "Waypoint-read-data-from-an-element-using-jquery", "dashedName": "Waypoint-read-data-from-an-element-using-jquery",
"difficulty": 3.17, "difficulty": 3.17,