Javascript / JQuery / OOP / JSON (junior) Flashcards
(157 cards)
What is a variable?
Where data can be stored!
Why are variables useful?
variable can be used to store and recall information through-out a program.
What two special characters can a variable begin with?
$ _
How do you declare a variable?
using a variable identifier
How do you assign a value to a variable?
= next to variable name
Are variables case sensitive?
yes
Which words cannot be used as variable names?
keywords (var, function, if) numbers..
What is a string?
Sub-series of characters that comes inside two ‘ or “
What is the string concatenation operator?
+
What is the difference when it comes to using single quotes or double quotes ( ‘ ‘ or “ “ )?
no difference in functionality
How do you escape quotation characters?
\ before the quote.
What is a number in JavaScript?
an integer
What is an arithmetic operator?
Mathematical function that takes two operands and performs a calculation on them.
Name four of the arithmetic operators?
add subtract
What is the order of execution?
PEMDAS
What is a boolean?
true / false
What is a comparison operator?
< = >
What is a comparison operator?
< = > == ===
What is a function?
Series of statements that are grouped together because they perform a specific task.
Why are functions useful?
you can reuse the function (rather than repeating the same set of statements).
How do you call a function?
function name followed by () with any argument inside.
What are the parts of a function definition?
function keyword, function name and code bloke inside curly braces.
What is the difference between a parameter and an argument?
methods are same as functions, except they’re created inside (and are part of) an object.
What is the difference between a parameter and an argument?
parameters are placeholders for values in function and arguments are the values when calling the function.