Lab #4


In this lab, we were suppose to create a ninja containing many traits about himself. In order to add those traits, we first have to create a variable named ninja. Once we got the variable, we now have to add things that make it a ninja. This is where we add objects to the variable. Basically objects gives traits to the variable. If we want to make the ninja var unique, We had to add a name, what it likes and for me I added the belt color. Now that the ninja variable is defined with objects, we were make the ninja do some actions, or else it would just be just information about the ninja.

First I added 3 buttons to the page and prepare the onClick tag. Specifically, we were only allowed to make the function inside the ninja variable. This is where we use a concept called methods. By using methods, we can create moves that specifically the ninja variable would have. I made the ninja punch, kick and dodge when you click on the respective buttons. This is basically what Lab #4 was all about. By doing this practice, it helps us refresh our brains on JavaScript to create innovative websites to attract more people

Comments

Popular posts from this blog

Lab 11

Final Portfolio Plan

Lab #43