I've learned that function is a program which performs a specific tasks like calculating, displaying images and checking valid input. I've also learned that function returns a value. And function statements are enclosed by a curly brackets. The fuction statement's format is like this:
function karis () { document.write ("Karis, you're so pretty.....") ; }
function name (paramater, parameter) {statement; statement; }
The arguments are received by the function in a list called parameters while arguments are passed to the receiving function. A function can be called directly from a link by using javascript pseudoprotocol instead of a normal link. I've also learned that event handler is a function assigned to an event like clicking a button.
Function may also return statements. This is used to send back the result of some task, such as calculation. There's also this function called recursive function, this function calls itself.
I've really learned a lot with functions and I hope that these things that I've learned will help me during the quizzes, activities and exercises. I hope that with this very short summary of my learnings. I hope that you've also learned from it.
This week, we also had an exercise making which will again give extra points to those lucky peoplets who can make it. Here's the ouput:
So, in this exercise Sandra and Johanna got 10 and 8 points respectively. When I call sir to check mine he questioned me about the things encoded in it like the double quote and the plus signs. Well, seriously I can't answer it. And when I realized that quotation marks and plus signs aren't needed, I immediately call sir but it's already late because it's 8:30 na :(( Huhuhu that moment when you're close in getting a point but negative forces don't agree. Urgh -.- better luck next time to me.
So, it's a bye for now. Thank you everyone =)
No comments:
Post a Comment