Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Source Code - Computer basics and Javascript

Total questions: 51

Worksheet time: 33mins

Name
Class
Date
1.

Long term storage items like photos, programs, music, and files most likely found on ___________________________________.

a)

RAM.

b)

ROM.

c)

a hard drive.

2.

What does ROM stand for?

a)

Random Operating Memory

b)

Read Only Memory

c)

Read Operating Memory

3.

Computers use a special code to express the digital information they process; what is it called?

a)

bits and bytes

b)

micro-processing

c)

binary code

d)

output

4.

What does RAM stand for?

a)

Random Access Memory

b)

Read Access Memory

c)

Read ASCII Memory

5.

Which item is an input device?

a)

Microprocessor

b)

Mouse

c)

Monitor

d)

Hard drive

6.

What does KB stand for?

a)

Kilobyte - 1024 bytes

b)

Ketobit- 1024 bits

c)

Kilkobit- 1, 000, 000 bits

7.

What are the four components of all computers?

a)

Power source, conducting path, load, switch

b)

Up, down, left, right

c)

Input, storage, processing, output

d)

Motherboard, processor, keyboard, monitor

8.

RAM memory is___________.

a)

permanent

b)

temporary

c)

not important

d)

a DVD

9.

This is an example of an output device?

a)

Printer

b)

Mouse

c)

Keyboard

d)

Microprocessor

10.
Indicates the beginning  and the end of a JavaScript section.
a)
<html> </html>
b)
<style> </style>
c)
<article> </article>
d)
<script> </script>
11.
A JavaScript file has an extension name of
a)
.jscp
b)
.js
c)
.css
d)
.Jp
12.
Which keyword do we need to define a function?
a)
function
b)
method
c)
onclick
d)
functionName()
13.
Which 1 of the following symbols is used for JavaScript comments?
a)
\\
b)
^
c)
?
d)
//
14.
What type of variable is
var typeOfApples="Fuji";
a)
Int
b)
Float
c)
Boolean
d)
String
15.

How can a developer show a pop-up message to the user?

a)

alert

b)

prompt

c)

console.log

d)

<p> tag

16.
Which message will the user see?
a)
"Hello user"
b)
No message
c)
"Goodbye user"
d)
"message + user"
17.

What attribute/value do we use to make a button execute JavaScript when clicked?

a)

onclick="doSomething;"

b)

on-click="doSomething;"

c)

onclick="doSomething();"

d)

onclick=doSomething();

18.
How do I declare a new variable?
a)
var newVariable = 5;
b)
Variable int = new Variable();
c)
var 5 = myVariable;
d)
int var = 5;
19.
How do we generate a random number?
a)
Math.random()
b)
random.number()
c)
number.random()
d)
Random.math()
20.
How do I change the size of an image?
a)
width / height
b)
scale
c)
size
d)
shrink
21.

Which of the following platform(s) can be used to run Javascript Code

a)

Google Chrome

b)

Firefox

c)

Microsoft Edge

d)

Safari

22.

What is the correct syntax for referring to an external JavaScript script?

a)

<script src="myscript.js"></script>

b)

<script href="myscript.js"></script>

c)

<js href="myscript.js"></js>

d)

<js src="myscript.js"></js>

23.
Which attribute(s) of the FORM and INPUT tags become the properties of the created object?
a)
value
b)
value and name
c)
name
d)
name and type
24.
What surrounds an if/else statement?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
25.
Which one of the following is the symbol for implementing the OR operator?
a)
**
b)
&&
c)
||
d)
!
26.
What type of variable is
var age = "5" 
a)
Int
b)
Float
c)
Boolean
d)
String
27.
What type of variable is
var numApples = 2; 
a)
Int
b)
Float
c)
Boolean
d)
String
28.
Which one of the following is the symbol for implementing the AND operator?
a)
&&
b)
**
c)
||
d)
++
29.
What best describes a variable?
a)
they allow the user to change language settings
b)
they allow the user to change the variable's data type
c)
they allow the user to save and call values
d)
they allow the user to declare a new data type
30.
A string;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
31.
The conditional statement, in Javascript, begins with the word _______.
a)
Then
b)
Else
c)
If
d)
OK
32.
A user-defined name for a memory location whose value can change over time.
a)
variable
b)
syntax
c)
operator
d)
token
33.
In JavaScript, you should include a semi-colon at the end of each statement.
a)
yes
b)
no
34.
JavaScript code is embedded in HTML documents between <script> and </script> tags.
a)
True
b)
False
35.
What type of quotation marks does JavaScript require?
a)
Single quotes (aka apostrophes)
b)
Double quotes
c)
Either single quotes or double quotes
d)
Neither single quotes or double quotes
36.
What character do we use for multiplication?
a)
#
b)
x
c)
*
d)
/
37.
What character do we use for division?
a)
#
b)
x
c)
*
d)
/
38.
How do we count the number of characters in a string?
a)
.length
b)
.numberOfCharacters
c)
.textLength()
d)
String.characters()
39.
How do we declare a variable that can change?
a)
constant
b)
const
c)
letter
d)
let
40.
What punctuation do we use if we need to check 2 conditions in a single if/else statement and either of them needs to be true?
a)
||
b)
*
c)
&
d)
&&
41.
What punctuation do we use if we need to check 2 conditions in a single if/else statement and both of them need to be true?
a)
||
b)
*
c)
&
d)
&&
42.
Computer programs or applications that tell a computer what to do is called ________.
a)
Play Store
b)
Software
c)
Hardware
d)
Application Manager
43.
The physical parts of the computer are called _______.
a)
software
b)
hardware
c)
computer parts
d)
computer case
44.
I am known as the "brain" of the computer because I receive information and carry out commands. I tell other parts of the computer what to do and when to do it.
a)
processor (CPU)
b)
motherboard
c)
power supply
d)
hard drive
45.
What does a computer allow you to do?
a)
Type documents and send email
b)
Browse the Internet
c)
Store and retrieve data
d)
All of the above
46.
The main circuit board in a computer is called the ________.
a)
RAM
b)
dongle
c)
motherboard
d)
 power supply unit
47.
1.  RAM and ROM are _________________ of a computer.   [1]
a)
backup storage
b)
temporary storage 
c)
peripherals
d)
main memory
48.
A speaker and a printer are input devices.
a)
True
b)
False
49.
A Graphical User Interface (GUI) uses ___ to help the user navigate within the computer system.
a)
Windows
b)
Videos
c)
Graphics
d)
Operating Systems
50.
A printer is an _____ device
a)
Output
b)
Input
c)
Processing
d)
Storage
51.
A DVD is an example of a storage device.
a)
True
b)
False