(CS3Q4) LQ Reviewer
(CS3Q4) LQ Reviewer
**Analyze codes
I. HTML Forms
● HTML form Tags
○ Group of tags that accepts input from the users. A single form can contain
multiple tags that accept different inputs. The tag is used to group
different form elements together.
○ The action attribute is used to indicate where the data inside the form
will be sent. The
action will only be
conducted when the
user triggers an event.
● Form handling is the processing of forms for interaction with the user and
retrieval of the inputted values for a server or a JavaScript code to use.
Form attributes
Checkboxes options with the same names By using a single name, we can iterate
but different values
through the choices like in an array.
Select ● List of choices in a dropdown
layout.
● One option can be chosen at a
time.
● Can also be set to accept multiple
options from the user by using the
attribute multiple, and pressing on
the ctrl or shift key when making
several selections
● while statement
○ repeats a statement or sequence of statements as long as they are
evaluated by a given conditional expression to a truthy value.
○ true (expression), the statements are executed again
○ false then the loop ends
○ repetition of a looping statement is known as iteration.
○ monitor the progress with a counter
■ incremented (increased)
■ decremented (decreased)
○
○
■ Should be 32
○
■ will be stuck in an INFINITE LOOP if you do not include code
that changes this value. It never ends in an infinite loop because its
CONDITIONAL EXPRESSION IS NEVER FALSIFIED.
■ a warning dialog box containing the text string 'Number is 1.' will
appear over and over again.
● do while statement
○ executes a statement or statements once, then repeats the execution as
long as it evaluates the true value of a given conditional expression.
○ condition sa dulo
○
■
● for int statement
○ more concise way of iterating over an object's properties. The for...in loop
will run for all of the object's elements
○
● break statement
○ \LOOP EXITS IMMEDIATELY without any other statements in the
loop being executed. Control is passed immediately to the statement
following the body of the loop.
○
● Continue statement
○ IT PREVENTS THE EXECUTION OF THE CURRENT ITERATION AND
GOES BACK TO THE BEGINNING OF THE LOOP to begin the next
iteration.
○ tuloy at hindi magbbreak
○
● Nested loop
○ type of loop that is made up of many loops
○ one loop within another
○ “Outer loop” is the first loop - “Inner loop” is the second loop
III. Arrays