Spaces:
Running
Running
typo var updates
Browse files
sketch.js
CHANGED
@@ -265,15 +265,16 @@ new p5(function (p5){
|
|
265 |
console.log("latest prompt: ", PROMPT_INPUT)
|
266 |
|
267 |
// create a list of the values in the blanks fields
|
|
|
268 |
blanksArray.forEach(b => {
|
269 |
blanksValues.push(b.value())
|
270 |
})
|
271 |
console.log(blanksValues)
|
272 |
|
273 |
-
// Fill in blanks from our sample prompt and make new prompts using our variable list '
|
274 |
-
|
275 |
-
let p = prompt.replace('[BLANK]', b) // replace the string segment with an item from the
|
276 |
-
promptArray.push(p) // add the new
|
277 |
})
|
278 |
console.log(promptArray)
|
279 |
|
|
|
265 |
console.log("latest prompt: ", PROMPT_INPUT)
|
266 |
|
267 |
// create a list of the values in the blanks fields
|
268 |
+
let blanksValues = []
|
269 |
blanksArray.forEach(b => {
|
270 |
blanksValues.push(b.value())
|
271 |
})
|
272 |
console.log(blanksValues)
|
273 |
|
274 |
+
// Fill in blanks from our sample prompt and make new prompts list using our variable list 'blanksValues'
|
275 |
+
blanksValues.forEach(b => {
|
276 |
+
let p = prompt.replace('[BLANK]', b) // replace the string segment with an item from the blanksValues
|
277 |
+
promptArray.push(p) // add the new prompts to the prompt list
|
278 |
})
|
279 |
console.log(promptArray)
|
280 |
|