diff --git a/data/quiltData.mjs b/data/quiltData.mjs
index 928096b..d2f1fca 100644
--- a/data/quiltData.mjs
+++ b/data/quiltData.mjs
@@ -20,6 +20,8 @@ let articles = [
testElement: '
dogfish - dogfish - dogfish - dogfish
',
inputs: [],
predictedOutputs: [],
+ answerHtml:
+ ``,
},
{
backgroundColor: '#256',
@@ -33,9 +35,19 @@ let articles = [
inputs: [[1, 2, 3], [11, 5, 9], [2, 11, 3]],
predictedOutputs: [[3, 3, 3], [11, 11, 11], [3, 3, 3]],
challengeSource: 'https://codingbat.com/prob/p146256',
-
+ answerHtml: `
+
+ `
},
]
+console.log('end quiltdata.');
diff --git a/helpers/quilt/immediateOutputFromInput.js b/helpers/quilt/immediateOutputFromInput.js
new file mode 100644
index 0000000..c2e883f
--- /dev/null
+++ b/helpers/quilt/immediateOutputFromInput.js
@@ -0,0 +1,6 @@
+let grub = (s)=>{
+ let now = new Date();
+ now = now.toLocaleString();
+ console.log(`At {now} here is: {str1}`);
+ return s + "-" + s;
+ }
\ No newline at end of file
diff --git a/helpers/quilt/maxEnd3.mjs b/helpers/quilt/maxEnd3.mjs
index d4d7080..a683051 100644
--- a/helpers/quilt/maxEnd3.mjs
+++ b/helpers/quilt/maxEnd3.mjs
@@ -1,16 +1,18 @@
-window.addEventListener('DOMContentLoaded', (event) => {
+// window.addEventListener('DOMContentLoaded', (event) => {
// const btn = document.getElementById('maxEnd3Button');
// btn.addEventListener('click', alert('whipping'));
let dice = {};
-
-dice.roll5 = function() {
+ dice.roll5 = function() {
return Math.ceil(5 * Math.random());
}
dice.show5 = function() {
// dice.el = document.getElementById('diceout');
- dice.el.innerHTML = dice.roll5();
- dice.el.style = `color: blue;`
+ console.log( dice.roll5());
}
-});
\ No newline at end of file
+console.log('end maxEnd3.mjs.');
+
+// });
+
+// THIS does not NEED ANY SPECIAL WRAPPER; Its scope will be fine that way. The wrapper blocks its scope otherwise.
diff --git a/helpers/quiltMain.js b/helpers/quiltMain.js
index fcbe35e..4108651 100644
--- a/helpers/quiltMain.js
+++ b/helpers/quiltMain.js
@@ -1,14 +1,15 @@
-document.addEventListener('DOMContentLoaded', (event) => {
+console.log('quiltmain Line 1.');
+
+window.addEventListener('load', (event) => {
console.log('DOM fully loaded and parsed');
-console.log('start quiltmain.');
-console.log(articles[1].backgroundColor);
-console.log('Done.');
+console.log('quiltmain Line 8.');
let divs = '';
-singleDiv = '';
+let singleDiv = '';
+let answerHtml = '';
articles.forEach(element => {
@@ -18,6 +19,7 @@ articles.forEach(element => {
`;
singleDiv += ``;
+ singleDiv += element.answerHtml;
singleDiv += `
diff --git a/quilt.html b/quilt.html
index f8b11a1..a1f529f 100644
--- a/quilt.html
+++ b/quilt.html
@@ -112,15 +112,18 @@
@@ -161,8 +164,9 @@
Making things in Madison, Wisconsin:
+
-
+