WorksheetsJS quiz
Total questions: 20
Worksheet time: 10mins
Is JavaScript a programming language
True
False
What does var stand for in JavaScript?
Value
Variable
Variant
Varying
Which symbol is used for comments in JavaScript?
<!-- -->
//
**
/# #/
How do you write a function in JavaScript?
def myFunc()
function: myFunc()
function myFunc() {}
func myFunc()
Which of these is not a JavaScript data type?
string
number
boolean
float
Which method is used to print something to the console?
printf()
echo()
console.log()
log.console()
Who developed JavaScript?
Dennis Ritchie
Uday Adhikari
Bjarne Stroustrup
Brendan Eich
What keyword is used to declare a constant in JavaScript?
var
const
let
static
JavaScript runs in which environment by default?
Browser
Server
Terminal
Computer
Which tag is used to add JavaScript in an HTML file?
<script>
<link>
<js>
<javascript>
JavaScript is a...
Compiled language
Markup language
Scripting language
Database language
Which of the following can store multiple values?
int
bool
char
array
How do you show a popup message in JavaScript?
popup("Hello")
alert("Hello")
message("Hello")
show("Hello")
Which of these is a correct variable name?
123name
@name
name-123
name_123
What does console.log("Hi") do?
Prints in alert box
Prints on the webpage
Prints in the browser console
Doesn't do anything
What does + do when used with strings?
What does + do when used with strings?
Adds numbers inside
Joins (concatenates) them
Returns an error
JavaScript file extension is:
.js
.java
.javascript
.jvs
Which of these is a number in JavaScript?
five
"5"
"five"
5
Which keyword is used to define a function in JavaScript?
define
function
procedure
method
Java and Javascript are related.
True
False
