FunctionsWe almost didn't have classes in ICT this week, for we were busy preparing for our last investigatory defense in this program (SSP) during Tuesday. But we finished it on Wednesday. After one day, we didn't still attend our classes; because, there was something going on inside Sir Peralta's room. And we might disturb them for our noises.
But before that, we had our one and only meeting on the first day which is Monday! And I was not still finished typing all of the codes for JS5. But Sir Peralta started discussing out lessons despite the fact that we were not finished yet with our codes. And... These are what I'd learned during the discussion: Function is a stand-alone block of statements, independent of the program until invoked by a caller. * The statement above is the main definition of a function in JavaScript 5. The function keyword is followed by the user-defined name of the function and a set of parenthesis e.g. function welcome (). A parameter holds a value that is sent to the function when it was called e.g. pal of the function, greetings (). A function can be called directly by a link, by using the JavaScript pseudoprotocol, javascript:, instead of a normal one. An example of this is when the user clicks the link, JavaScript calls the greetings () function (which you can see in the Figure 7.5 on the JS5 document. That's all! Bye!
0 Comments
JS5Hi there! How was your hands-on quiz in JS4? Did you find it easy? Or the other way around? What ever the result you'd got, you still had points (based on the criteria given). And if you're going to ask me, I had a score higher than what I expected. As I always get lower scores in the past. But this time, I got a score of 55 out of 75 points. At first, I thought I got 45. But Sir Peralta corrected us those who had 45 written on their one-half lengthwise papers. After that, we copied Sir's code showed on the tv screen. For us to have the right code of the said quiz when it is time to check our files in JS4. So as expected, we started typing codes based on the JS5 document our teacher pasted in the Documents folder on our computers. But I was still not finished typing all codes on our 3rd meeting this week (Wednesday). And we're not going to continue those tomorrow. It is because we're going to hold a program tomorrow. Most of us will sing (by groups) and some will be going to take care of the equipment and two of our classmates will be assigned as emcees... So we are going to finish all of those next week. That's all for this week.
More LoopsWe were finished with the first two exercises last week. So we had taken our 3 exercises which were Exercises 3, 4, and 5. And to be honest, I really had no idea on how to do of all the exercises. For I am not good at coding complex loops and finishing those on time. But the exercises are being discussed to us afterwards by our classmates who have finished it earlier. Then, I understood how the exercises being made one at a time. |