@@ -240,9 +240,6 @@ Solving Programming Problems
240240 1.2: BREAK DOWN THE QUESTION:
241241 • To get a better idea of the requirements of the problem/question, break down the
242242 problem/question into smaller components.
243- 1.3: BREAK DOWN THE CONCEPTS IN THE QUESTION:
244- •
245-
246243 1.3: CREATE QUESTIONS ABOUT THE PROBLEM:
247244 • Create a small list of questions about the problem.
248245 1.3: EXPLAIN THE PROBLEM:
@@ -266,23 +263,23 @@ Solving Programming Problems
266263
267264 BREAK DOWN THE PROBLEM:
268265 =======================
269- "Create a simple function "selectEvenNumbers..."
266+ "Create a simple function "selectEvenNumbers..."
270267 • In this case, we'll just setup a simple function declaration named "selectEvenNumbers".
271268 --------------------------------------
272269 function selectEvenNumbers() { <== Created "selectEvenNumbers" function declaration.
273270 // code goes here
274271 }
275272 --------------------------------------
276273
277- "...that will take in an array of numbers..."
274+ "...that will take in an array of numbers..."
278275 • This says that we need to PASS IN an array of numbers for the function to process.
279276 -------------------------------------------------
280277 function selectEvenNumbers(arrayOfNumbers) { <== Created "arrayOfNumbers" parameter.
281278 // code goes here...
282279 }
283280 -------------------------------------------------
284281
285- "...and return an array "evenNumbers" of only even numbers."
282+ "...and return an array "evenNumbers" of only even numbers."
286283 • So at this point, we actually get a hint of what to do next, which is how to store our even numbers in
287284 an evenNumbers variable.
288285 --------------------------------------------------
@@ -293,15 +290,12 @@ Solving Programming Problems
293290 }
294291 --------------------------------------------------
295292
296- "If there are no even numbers, return the empty array "evenNumbers."
293+ "If there are no even numbers, return the empty array "evenNumbers."
297294 • In this case, when we return evenNumbers and there are no even numbers in the data set, it
298295 will return an empty array in any case!
299296
300297
301- BREAKDOWN THE CONCEPTS IN THE PROBLEM:
302- =====================================
303- • Now that you broke down the
304-
298+
305299
306300
307301
0 commit comments