mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-29 07:00:53 -04:00
Keywords are not function calls
This commit is contained in:
@@ -207,8 +207,8 @@
|
||||
"Now try it yourself! Modify the <code>Bike</code> <code>constructor</code> to have a <code>private property</code> called <code>gear</code> and two <code>public methods</code> called <code>getGear</code> and <code>setGear</code> to get and set that value."
|
||||
],
|
||||
"tests":[
|
||||
"assert(typeof myBike.getGear !== 'undefined' && typeof(myBike.getGear) === 'function', 'message: The method <code>getGear</code> of <code>myBike</code> should be accessible outside the object.');",
|
||||
"assert(typeof myBike.setGear !== 'undefined' && typeof(myBike.setGear) === 'function', 'message: The method <code>setGear</code> of <code>myBike</code> should be accessible outside the object.');",
|
||||
"assert(typeof myBike.getGear !== 'undefined' && typeof myBike.getGear === 'function', 'message: The method <code>getGear</code> of <code>myBike</code> should be accessible outside the object.');",
|
||||
"assert(typeof myBike.setGear !== 'undefined' && typeof myBike.setGear === 'function', 'message: The method <code>setGear</code> of <code>myBike</code> should be accessible outside the object.');",
|
||||
"assert(typeof myBike.gear === 'undefined', 'message: <code>myBike.gear</code> should remain undefined.');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
@@ -453,7 +453,7 @@
|
||||
],
|
||||
"tests":[
|
||||
"assert(/\\.split\\(/gi, 'message: You should use the <code>split</code> method on the string.');",
|
||||
"assert(typeof(array) === 'object' && array.length === 5, 'message: You should split the string by its spaces.');"
|
||||
"assert(typeof array === 'object' && array.length === 5, 'message: You should split the string by its spaces.');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
"var string = \"Split me into an array\";",
|
||||
@@ -481,7 +481,7 @@
|
||||
"Use the <code>join</code> method to create a string from <code>joinMe</code> with spaces in between each element and assign it to <code>joinedString</code>."
|
||||
],
|
||||
"tests":[
|
||||
"assert(typeof(joinedString) === 'string' && joinedString === \"Split me into an array\", 'message: You should join the elements of the array with spaces.');",
|
||||
"assert(typeof joinedString === 'string' && joinedString === \"Split me into an array\", 'message: You should join the elements of the array with spaces.');",
|
||||
"assert(/\\.join\\(/gi, 'message: You should use of the <code>join</code> method on the array.');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
|
||||
Reference in New Issue
Block a user