[FINAL] – The Moron Test – Fail Icons and FailScene Function


Hello. Video 19 was great. I loved adding the init() function along with the fail scene. I feel like the project is complete with these additions. Whiling doing the walk through, I really didn’t face any problems except the the .fail-space class was called delay-space on my part. Also some CSS properties where missing on my end, such as z-index in certain parts. I believe the original file I downloaded was eventually altered by Mike’s one. I caught on to the changes and knew what was the problem though. I plan to add stuff onto the moron project. Overall, this project was GREAT!

Video Walkthrough – Video 19


Week #5: Objects

let post = {
    user_avatar: "wwe.jpg",
    user_name: "wwe",
    user_handle: "@wwe",
    content: {
        date: "May 14, 2020",
        text: "@wwerollins is a thrilled dad-to-be. He and @beckylynchwwe meet their little bundle of joy this December!"
        media: "beckylynch.jpg",
        links: {
            like: function(){},
            share: function(){}
            comment: function (){}
            save: function(){}
        }
    }
}

Classwork

http://clomichelle.net/webdev1/05week-objects/cw-05week/

Problem Set

http://clomichelle.net/webdev1/05week-objects/ps-05week/

Week #4: Arrays

Some methods for arrays are pop()/push() and shift ()/unshift(). Push () adds at the end of the array. It gives you the number of the array and adds it. Pop () does the opposite, it removes the last element of the array. It tells you what you are returning back. Now shift () is to remove the first item of the array. Unshift () doing the opposite adds at the front of the array.

Pop ()
let names = ['Clo', 'Dj', 'Nate', 'Nathalie']
names.pop (); ['Clo', 'Dj', 'Nate']

Push ()
let names = ['Clo', 'Dj', 'Nate', 'Nathalie']
names.push (Orlando); ['Clo', 'Dj', 'Nate', 'Nathalie', 'Orlando']

Shift ()
let names = ['Clo', 'Dj', 'Nate', 'Nathalie']
names.shift (); ['Dj', 'Nate', 'Nathalie']

Unshift ()
let names = ['Clo', 'Dj', 'Nate', 'Nathalie']
names.unshift (Orlando); ['Orlando','Clo', 'Dj', 'Nate', 'Nathalie']

Classwork

http://clomichelle.net/webdev1/04week-arrays/cw-04week/

Problem Set

http://clomichelle.net/webdev1/04week-arrays/ps-04week/

Week #3: Functions

The difference between declaring a function and calling a function is declaring a function is giving a name to a line of code. Then calling a function is reciting back the name and passing through a command. Has to be written with ().

ex.
Declare
function doSomething () {
         console.log ("Hello world");
}

Call
doSomething ()

Classwork

http://clomichelle.net/webdev1/03week-functions/cw-03week/

Problem Set

http://clomichelle.net/webdev1/03week-functions/ps-03week/

Week #2: Control Flow

You can use “falsey-ness” to see if a value is true or false. Type coercion is a way to get numbers in the same format.

Falsey Values
-false
-0
-""
-null
-undefined
-NaN
ex. for loop
for (let i=0; i < str. length; i+=2){
console.log (str. [i]);
ex. while loop
let count = 1
while (count < 6) {
console.log ("count is: " + count);
count ++; }

Classwork

http://clomichelle.net/webdev1/02week-control-flow/cw-02week/

Problem Set

http://clomichelle.net/webdev1/02week-control-flow/ps-02week/

WEEK #1: Why Learn to Code? 08- Introduction to JavaScript, Problem Set, Blog Question

From the article under “common concerns and fears” a section that caught my eye was the paragraph that started “do I have to be good with math?” This was a big concern for me if math was going to be a part of coding but it doesn’t. I like math but my brain thought it would get complicated but the general add, subtract, divide and multiply with a little algebra is good with me XD. I also liked that you can learn coding at any age so I hope it’s something I can understand at some point. In the same article under “questions about learning” one question I have is what is language X and Y? Which one is easier to know? I also liked the little paragraph on motivation. “First action, then motivation” it is very true and starting off small can help get into the flow to do bigger works of coding.

Classwork & Problem Set

http://clomichelle.net/webdev1/01week-intro-to-js/cw-01wee

Problem Set Part 2

http://clomichelle.net/webdev1/01week-intro-to-js/ps-01week/

Timing Functions and Start / Finish Functions

blog question:

Basically every scene that we create will have a start, finish, and main objects with its declaration. each of these objects corresponds to different things happening. The start object deals with any set of instructions that needs to be run during the start of the scene. we initialize this in our function play scene, so when a new scene is called and you play the scene the instructions are run. While the finish object, in essence, counts the number of clicks needed to complete the scene. once the user has used up all the clicks the finish object will run any functions that are passed to it. we call our finish object in our check function, where we check ” if (clickCount === clicksNeeded) “.



week 9,10,11 and 12- The final Video Walkthrough AkA The End

I don’t know if what prison feels like but if its anything like quarantine you will never see me do anything bad or mischievous ever again.

but here some codes

week 9- Video Walkthrough part 2

week 10- Video Walkthrough part 3

week 11- Video Walkthrough part 4

week 12- Video Walkthrough part 5

For the blog

  1. Describe the process for clearing and mapping icons to the DOM. What are the three steps and the core functions? Describe how the four methods used for this process work – createElementfirstElementChildremoveChild, and appendChild.

we have to create a variable that contains all the instances of the icon and the instruction using a query selector. in the clear function, we use a statement that check if there is an element within the space we are looking at, to accomplish this we use “.firstElementChild” if there is one the next step is to clear either the icon or instruction using removeChild in which we pass the first child of the element as a reference. For the mapping function we take in the level as a parameter we then access that scenes icons using the level.

2. Describe how the spread operator is used to convert a node list of selected elements into an array. Describe why we needed this conversion and how the array was helpful for our first test in the game’s logic.

The spread operator is necessary because it looks at many arguments in a function and it passes the argument and adds it at one time. it allows us to turn the nodelist into an iterable array with a [i] elements. The i elements is based on how many i elements you have. We are essentially setting iconArr equal to an empty array with the spread operator calling each of the icons from the nodelist.

3. Describe how the scene[level].main(icon, indx) function is called within the check(icon, indx) function. How are we tracking the icon and index values? Why do we need to track and pass the icon and index values to the scene’s main function? What does the scene’s main function do with these values?

within our “check(icon, indx)” function we use “scene[level].main(icon, indx);” in order to access scene-specific instructions. in order to access these instructions, we need to know three vital pieces of information. the first on which is the level, the icon that was clicked on, and the index of the said icon which is passed onto main in the second js file, scences.js, main takes these values and if there are scene-specific instructions they will take place.

4. Describe how the start and finish functions are called in moron.js. How does the program know if there is a start or finish function to run? Where is each start or finish function placed and why?

The start is used if we need to run a function when a scene starts. The main is used for all the logic functions. The finish is if we need to run a function after someone has completed all the clicks they need to click. The start and finish functions are null unless there are things that need to be done at the start of the scene or if things need to be done after the clicks are done.

css.php