stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
JavaScript Flashcards | StudBud
Explore
/
JavaScript
JavaScript
69 terms
·
StudBud Administration
·
6 plays
Imported from external platform
Flashcards
69 cards
F
Practice quiz
P
Host live
L
Questions
69
Answers
1
What is the value of the JavaScript expression
7 + 3
?
10
4
-4
21
2
JavaScript expressions...
cannot include literals.
must evaluate to a value.
must include operators.
must represent known formulas.
3
Java, C Language, C++, C#, Objective-C, PHP, Python, RUBY, JavaScript ,SQL are examples of
binary code
compiled software
programming languages
playschool animals
4
How to check equivalency in Javascript?
==
====
=
===
5
Is JavaScript Case Sensitive??
No
Yes
6
The use of "||" when making decisions with JavaScript means...
criteria 1 AND criteria 2 must be met.
criteria 1 or criteria 2 must be met.
none of the criteria needs be met
7
What tag do you need to add javascript to a website ?
<add-script="javascript"/>
<javascript>... </javascript>
<script>...</script>
<code type="javascript">
8
What keyword do you need to use to define a variable in JavaScript?
var
variable
x
int
9
What's the value of the JavaScript expression
myShoeSize <= yourShoeSize && myGPA != yourGPA
?
false, if my feet are bigger than yours
true, if your feet are at least as big as mine
false, if our feet are the same size
true, if our GPA's are NOT the same
10
What is the value of the JavaScript expression
myGPA - 0.5
?
potentially, any real number
unknown
potentially, any positive real number
within the range -0.5 to 4.5
11
What symbol represents the or operator in JavaScript?
or
OR
|
||
12
How do you create a function in JavaScript?
function -> myFunction()
function myFunction()
function = myFunction()
function:myFunction()
13
JavaScript is the most common way change color, text size, fonts, background colors or images, and so much more.
True
False
14
Which statement about strings in JavaScript is true?
Strings with numerical digits in them are invalid.
Strings cannot include spaces.
Strings are not indicated with quotation marks.
A string can be empty, meaning that it contains nothing.
15
JavaScript is used to do what?
Access information on the Internet
Make websites interactive
All of the above
Build apps and games
16
Inside what tag goes links to JavaScript or CSS files, and meta tags that describe the site?
Head
Body
Script
Style
17
What does the following JavaScript code snippet do when the code is loaded in a browser?
Displays the text "My JavaScript Button" and a button labeled "Click me!"
Displays a button labeled "Click me!"
Nothing, this code will not load in a browser
Displays a pop-up window with the message "You are coding with JavaScript!"
18
What is the proper operator for “not equals” in JavaScript?
NOT EQUALS
=!
~=
!=
19
How to write an IF statement in JavaScript?
if i = 5 then
if i = 5
if (i == 5)
if i == 5 then
20
Which JavaScript statement will result in the following output being displayed to the console?
console.log("Good morning!\tAwake yet?");
console.log("Good morning!\n\nAwake yet?");
console.log("Good morning!\nAwake yet?");
console.log("Good morning!\bAwake yet?");
21
How do you declare a variable in JavaScript??
Var==
Var+*=
Var+=
Var=
22
What are conditionals in JavaScript used for?
conditionals are not used at all.
to help your program make decisions by evaluating statements.
to connect HTML, CSS, and JavaScript.
as an accessibility feature.
23
What is the value of the JavaScript expression
14 % 4
?
10
-10
4
2
24
Which is the correct way to declare a variable in Javascript?
item = 'milk'
var item = 'milk';
variable = "item";
milk = var item;
25
What is a variable in JavaScript?
Store values in containers so we can use them never.
Store values in containers so we can use them once.
Store values in containers so we can use them later.
Store values in containers so we can't use them later.
26
Inside which HTML element do we put the JavaScript?
<js>
<script>
<scripting>
<javascript>
27
Python and JavaScript are examples of __________.
logic gates
operating systems
programming languages
file systems
28
How can you add a comment in a JavaScript?
<!--This is a comment-->
'This is a comment
//This is a comment
**This is a comment
29
What is output with JavaScript?
Output is never used with JavaSript
Output is similar to input.
Output it to see what it looks like.
Output is to see what it doesn't looks like.
30
Is JavaScript related at all to Java?
Maybe....
Yes
No
Try asking again!
31
JavaScript is a …?
Integrated Development Environment
Runtime Environment
Programming Language
Software Development Kit
32
what are assets in JavaScript?
what you can see
what you cant see
images you see
different functions
33
JavaScript functions are always needed to add interactivity to a web page
true
false
34
Which two lines of code are valid Java, JavaScript, C, C# and C++ comments?
<!--How-->
//Hello
/*World*/
#Are you?
35
before you use a variable in javascript you need to.....
name it
use it
declare it
36
JavaScript is also a Server-side Scripting language
False
I'm going with maybe.
True
IRDC/IRDK
37
In Javascript, each
variable declaration
must start with the word...
var
vbl
v_name
variable
38
JavaScript identifiers...
are not case sensitive.
must use English words.
have no specific guidelines.
are used to name a portion of RAM.
39
JavaScript is what kind of language language?
client-side
script-side
web-side
server-side
40
JavaScript is a full programming language.
False
True
41
Which JavaScript operator assigns a value?
==
=
++
+
42
What symbol represents the
or
operator in JavaScript?
OR
or
|
||
43
JavaScript html Tag is typically defined using the _____ tag.
<script> </script>
<jQuery> </jQuery>
<jsscript> </jscript>
<java> </java>
44
The external JavaScript file must contain the <script> tag.
True
False
45
When using JSX inside of JavaScript, the ___ must be imported.
React library
node modules
components
static files
46
JavaScript also has built-in features, called
functions
. What is a function?
Write a word (without quotes) and end it with parentheses.
Write a word and end it with parentheses & colon.
Write a word and end it with parentheses & semi-colon
Write a word (with quotes) and end it with parentheses.
47
'$this' is JavaScript code that means 'this object that is currently selected'.
True
False
48
It's a good idea to disable JavaScript within a browser if there is any doubt of a website's security.
True
False
49
What is the Javascript symbol for '
greater than
'?
<=
<
>=
>
50
JavaScript variables...
are required for all JavaScript apps.
must be assigned a value.
must adhere to identifier guidelines.
cannot be combined with other variables.
51
Every line of Javascript code
must end
with a...
colon :
comma ,
full-stop .
semi-colon ;
52
Is there a difference between Java and JavaScript?
Java is a programming language whilst JavaScript is a scripting language
JavaScript is a programming language whilst Java is a scripting language
There is no difference
53
Look at the JavaScript below. Something happens when a button is clicked. What is it?
Says "Page Loaded"
Says "Alert"
Says "Click Me"
Says "Hi"
54
What is the value of the JavaScript expression
-4 < 1
?
5
true
false
-5
55
The JavaScript property innerHTML, refers to what?
Text content
The content of an object
The curren value of another property
Name of object
56
What symbol represents the
and
operator in JavaScript?
AND
&
&&
and
57
A store has 20 apples in inventory.How can you store this information in a JavaScript variable?
20 = numApples;
var numApples == 20;
var num apples = 20;
var numApples = 20;
58
Which line of JavaScript code is not terminated properly?
parse(data).
var x = y + z;
a = [x,y,z];
if(color=="blue"){}
59
What tag is used to Insert JavaScript into an HTML Document
<JavaScript>
<js>
<java>
<script>
60
Which statement about JavaScript is TRUE?
all three.
animate and resize page elements
transmit users' browsing activity to other parties
provides video and audio
61
Since class is a reserved word in JavaScript, HTML classes are referred to with ___ in JSX.
Class
classID
classJSX
className
62
Numbers can be written in javascript....
with or without decimals
without decimals
with decimals
without numbers
63
are java and javascript the same language?
No
Yes
64
What symbol is used to negate a boolean in JavaScript?
NOT
~
%
!
65
What is the value of the JavaScript expression
23 < 1 | | 12 > 6
?
-20
20
false
true
66
Javascript is a lighter version of Java
True
False
67
What does JavaScript add to webpages?
Style Sheets
Interactivity
Images
Text and content
68
JavaScript
is used mostly in...
interactive web pages
GPS navigation
video applications
communications software
69
In Javascript, which punctuation mark is used to end every line of code?
: Colon
, Comma
. Period
; Semicolon