Search Header Logo

IP: JavaScript & jQuery

Authored by Allison Granstedt

Computers

9th - 12th Grade

Used 25+ times

IP: JavaScript & jQuery
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In JavaScript, how would I declare a constant myName?

constant myName = "Michael Phelps";

var myName = "Michael Phelps";

const MyName = "Captain Sparrow";

const myName = "Princess Buttercup";

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do I declare a variable named weekDay and set it to "Tuesday"?

weekDay = "Tuesday";

let weekDay = "Tuesday";

const weekDay = "Tuesday";

WeekDay = "Tuesday";

3.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Which of the options below should replace ??? if we wish to sprint on the console "Gonna get coal" when the variable naughty is true?


if (???) {

console.log("Gonna get coal");

} else {

console.log("Lots of presents!");

}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In JavaScript, how do I call myFunction()?

myFunction();

myFunction;

call myFunction();

call function myFunction();

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Select one or more of the following answers to this question: Why are functions useful in JavaScript?

I can give a function any name I want.

Descriptive function names help programmers to understand the program design.

Any function can be called by from any other place in your code (code reuse).

A function gathers together a group of code to perform a particular task and gives it a name.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In JavaScript, what symbolizes "is equal to"?

=

!=

===

==

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the jQuery statement $(document).ready() do?

It moves the <script> to the end of the HTML page.

It starts the script immediately.

It waits until the browser has finished downloading the web page to begin executing.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?