web dev 2nd summative
100 flashcards · Other · by Yan Cu
is a special symbol used to perform operations on operands (values and variables
operator
what is this called '+'
operator
what are the arithmetic operators?
+ (addition) - (subtraction) * (multiplication) / (division) % (modulo)
These operators involve the mathematical operators that can be used to perform various simple or advanced arithmetic operations on the primitive data types referred to as the operands
arithmetic operator
primitive data types are referred to as
operands
These operators consist of various unary and binary operators that can be applied on a single or two operands
arithmetic operator
javascript supports what arithmetic operators
addition subtraction multiplication division modulus increment decrement
are used in java to assign values to variables
assignment operators
used to assign the value, variable and function to another variable
assignment operators
are used to compare two values
comparison operators
are used to check whether an expression is true or false
logical operators
used in decision making
logical operators
also known as the ternary operator
conditional operator
this operator consists of three operands and is used to evaluate boolean expressions
conditional operator
the goal of the operator is to decide which value should be assigned to the variable
conditional operator
the types of conditional operator
conditional AND conditional OR ternary operator
conditional AND is denoted by what operators two __
AND operators (&&)
it returns true if and only if both expressions are true, else returns false
conditional AND
conditional OR is denoted by the __ operator
OR (||)
it returns true if any of the expression is true, else returns false
conditional OR
the ternary operator consists of __ operands
three
it is used to evaluate boolean expressions
ternary operator
the operator decides which value will be assigned to the variable
ternary
it is the only conditional operator that accepts three operands
ternary operator
it can be used instead of the if-else statement
ternary operator
is placed before its single operand
type operators
is a document which stores information of a user on a web server using interactive controls
HTML form
contains different kinds of information such as username, password, contact number, email id
HTML form
the most common elements used in HTML forms
textfield check box password field radio button submit button
is a one line input field allowing the user to input text
text field
password fieldtext field input controls are
"input" with type attribute having value as "text"
a type of text field in which the text entered is masked using asterisk or dots for prevention of user identity from another person who is looking onto the screen
password field input controls are
"input" element with type attribute "password"
used to let the user select exactly one option from a list of predefined options
radio buttons
radio button input controls are created using the "__" element with a type attribute having value as "__"
input, radio
used to let the user select one or more options from a pre-defined set of options
checkboxes
checkbox input controls are created using the "__" element with a type attribute having value as "__"
input, checkbox
Used to allow the user to select a local file and send it as an attachment to the web server. It is similar to a text box with a button which allows the user to browse for a file. Instead of browsing for the file, the path and the name of the file can also be written
File Select Boxes
File select boxes are created using the “__” element with a type attribute having value as “__”
input, file
Is a multiple line text input control which allows user to provide a description or text in multiple lines
Text area
A Text Area input control is created using the “__” element
textarea,
Used to allow users to select one or more than one option from a pull-down list of options
Select Boxes
Select boxes are created using two elements which are “__” and “__”
select, option
Allows the user to send the form data to the web server
Reset And Submit Buttons
is used to reset the form data and use the default values
Reset Button
are always stored in double-precision 64-bit binary format IEEE 75
JavaScript numbers
stores numbers in __ bits, where the number (the fraction) is stored in bits __ to __, the exponent in bits __ to __, and the sign in bit __
64, 0, 51, 52, 62, 63
__ __ are primitive data types
JavaScript numbers
returns the largest minimum value
MIN_VALUE
returns the largest maximum value
MAX_VALUE
returns positive infinity, overflow value
POSITIVE_INFINITY
returns negative infinity, overflow value
NEGATIVE_INFINITY
represents "not a number" value
NaN
It determines whether the given value is a finite number.
is_Finite()
It determines whether the given value is an integer.
is_Integer
It converts the given string into a floating point number.
parseFloat()
It converts the given string into an integer number.
parseInt()
It returns the string that represents exponential notation of the given number.
toExponential()
It returns the string that represents a number with exact digits after a decimal point.
toFixed()
It returns the string representing a number of specified precision.
toPrecision()
It returns the given number in the form of string
toString()
are "things" that happen to HTML elements
JavaScript events
The user clicks an HTML element
onclick
The user moves the mouse over an HTML element
onmouseover
The user moves the mouse away from an HTML element
onmouseout
An HTML element has been changed
onchange
The user pushes a keyboard key
onkeydown
The user releases a keyboard key
onkeyup
The user presses a key on the keyboard
onkeypress
The browser has finished loading the page
onload
are stand-alone organization of properties and methods
Objects
Javascript Objects are __ too
variables
Are name:values in javascripts object
properties
Are the actions that can performed on objects
methods
Is a block of code designed to perform a task and executed when is been called or invoked
javascript functions
is declared using the function keyword.
function
It is better to write a __ name for your function
descriptive
The body of function is written within _ _
{ }
how to call to declare a function:
greet();
how to declare function greet and output "hello there"
function greet(){ console.log("Hello there!"); }
A function can also be declared with __
parameters
is a value that is passed when declaring a function
parameter
this is an example of declaring with what? function greet(name) { console.log("Hello " + name + ":)"); let name = prompt ("Enter a name: ");
parameter
how many times can you call a function
as many times as you want
can be used to return the value to a function call
return statement
If nothing is returned, the function returns an __ __
undefined value
Benefits of Using a Function
Function makes the code reusable. You can declare it once and use it multiple times. Function makes the program easier as each small task is divided into a function. Function increases readability.
is everything from the start tag to the end tag
HTML element
HTML elements can be __
nested
All HTML documents consist of __ HTML elements
nested
these are examples of what <html>, <body>, <h1> and <p>
HTML elements
is the root element and it defines the whole HTML document
<html> element
an HTML element has a __ tag and an __ tag
start, end
inside the <html> element there is a __ element
<body>
The __ element defines the document's body
<body>
The __ element defines a heading
<h1>
The __ element defines a paragraph
<p>
HTML elements with no content are called __ __
empty elements
The __ tag defines a line break
<br>
HTML tags are not __ __
case sensitive