Thursday, November 17, 2016

Web Client Programming
Kevin Martinez
I.T.H.S
This is my Lab 2 in Web Client Programming, for Lab 2 we had to create 3 buttons using JavaScript and they were going to be popUp messages when you clicked on them. To create this I used my previous knowledge from Lab 1 and I used the same code but I added another code to it so that you will get the popUp message the part I added to my previous code is I added a Function to my code which when you click on the button you will get the Function working and showing you the popUp in that popUp I wrote down my First SMART goal of the new year. I learned that without the alert that this would have not work and that was were I was stuck I had a hard time trying to trouble-shoot my HTML and JavaScript file for an error because at first this wasn't working for me at all. Here is an example of my JavaScript code:                                                                                                  function goal1(evt)
{
 alert ('My first S.M.A.R.T goal is the most important goal I want to achieve and it is to pass my Web Client Programming class with a 95 by the time the first marking period ends. I will achieve this goal before the marking period ends by doing all my Labs and Projects correctly and adding some more code we learned last year in Digital Design to both my Labs and Projects. This is how I plan to achieve my first S.M.A.R.T .');
} .    That is the code I use to make my Button and my popUp messages work in my Lab 2.

LAB1

Kevin Martinez
I.T.H.S
09/23/16
This is my very first Lab as a senior in Web Client Programming for our Lab 1 we had to create a button. To make this we learned about JavaScript and what JavaScript is and how we need to use it and how to apply it to our Lab's and Project's going forward. To create this button I went to w3schools yo see and example of how a button is used in JavaScript. After that i got an example so I went to work on my button. What I did was I added something else I learned from W3Schools which was when you hover over my button you get to arrows next to the Click Me and the letters click me changes it size and moves a little bit to the left so the arrows will pop up. When you click on the button you will get a short sentence which says Hello JavaScript. when you add JavaScript to the button you will be able to add a short sentence saying what ever you want. That is what I did in Lab 1 for Web Client Programming.

Thursday, November 10, 2016

Switch and Loop

Kevin Martinez
Web Client Programming
I.T.H.S
11/10/16

                                             JavaScript Switch Statement

            JavaScript Switch Statement is a code that we will use in JavaScript and it is used to perform different actions that is based on different conditions. We will use the Switch Statement to call on one of the blocks to be used. How to use Switch Statement is like this first, you will evaluated the expression once. Then the expression is going to be compared to the values you put in each case in the code. Lastly once there is a match between the expression and the case value then the block of code is going to be executed. When you use this code you got to make sure you use the word "break" in order for it to work. The keyword is break because once the code runs and it hits the work "break" it will break out of switch break and then the expression is going to compare with the case values to see if theres a match. if theres no match it will go on to the next break and repeat this process again until their is a match. Here is an example we got from w3schools (Image): --------------------------->
The example of the code Switch Statement would be used in situations like when you are trying to find out Today is...... and this code will give you the result Today is Thursday by looking and finding a match with the case.  


   JavaScript For Loops

   JavaScript for Loop is another code, JavaScript Loops can execute a block of code a number of times. When JavaScript Loops run it has the ability to run  the same code over and over again, each time with a different value. From reading the article in w3schools I learned that their are 4 different kinds of Loops the first is for - for loops through a block of code a number of times. The second one is for/in - for/in loops through the properties of an object. The third while - while loops through a block of code while a specified condition is true. The fourth do/while - do/while also loops through a block of code while a specified condition is true. These are the four different types of Loops I learned from reading the article. Here is an example from w3schools of 
JavaScript Loops: ----------------------------------> 
The code is being used the call up three things from var 1. cars , 2. text and , 3. i . All these var work together if for example you take out what is in var text then your code won't call var cars because for var cars to be called you need what's inside var text and for var tex to work you need what's inside var i , if you take out one of these var then your code won't work and noting would show up. 

Tuesday, November 1, 2016

JavaScript If...Else Statements

Web Client Programming
Kevin Martinez
11/01/16
I.T.H.S



              The link I used to get more information and learn a little more about if...else statements are in w3schools(http://www.w3schools.com/js/js_if_else.asp). Once I was their I was reading the page to get more information about the if...else statements and what I got from reading that is that the if...else statements are used in JavaScript when you are going to write a code with a true or false question. For example I would say I am 15 years old but I'm not that would be a false statement so the code would work as follows since my first expression id is false then if would go to the next line of the statement and it would give you the correct answer. That's what the If...Else statements are used for. I also learned that If you write your if....else statements and you write the if or else part all cap letters you would get an error in your JavaScript, you would need to write it as lowercase letters if and else so your code would work.