Spaces:
Running
Running
typo
Browse files
sketch.js
CHANGED
@@ -263,6 +263,7 @@ new p5(function (p5){
|
|
263 |
// GRAB CURRENT FIELD INPUTS FROM PROMPT & BLANKS
|
264 |
PROMPT_INPUT = promptField.value() // grab update to the prompt if it's been changed
|
265 |
console.log("latest prompt: ", PROMPT_INPUT)
|
|
|
266 |
|
267 |
// create a list of the values in the blanks fields
|
268 |
let blanksValues = []
|
@@ -273,7 +274,7 @@ new p5(function (p5){
|
|
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 =
|
277 |
promptArray.push(p) // add the new prompts to the prompt list
|
278 |
})
|
279 |
console.log(promptArray)
|
|
|
263 |
// GRAB CURRENT FIELD INPUTS FROM PROMPT & BLANKS
|
264 |
PROMPT_INPUT = promptField.value() // grab update to the prompt if it's been changed
|
265 |
console.log("latest prompt: ", PROMPT_INPUT)
|
266 |
+
console.log(blanksArray)
|
267 |
|
268 |
// create a list of the values in the blanks fields
|
269 |
let blanksValues = []
|
|
|
274 |
|
275 |
// Fill in blanks from our sample prompt and make new prompts list using our variable list 'blanksValues'
|
276 |
blanksValues.forEach(b => {
|
277 |
+
let p = PROMPT_INPUT.replace('[BLANK]', b) // replace the string segment with an item from the blanksValues
|
278 |
promptArray.push(p) // add the new prompts to the prompt list
|
279 |
})
|
280 |
console.log(promptArray)
|