Search Header Logo

Final Review - Unit 4

Authored by William Kelly

Computers

9th - 12th Grade

Used 2+ times

Final Review - Unit 4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

10 mins • 1 pt

Which of these are correct methods to create a function?

function myFunction {

// Some code }

function myFunction[] {

// Some code }

function myFunction() {

// Some code }

function myFunction(x, y, z) {

// Some code }

2.

MULTIPLE SELECT QUESTION

10 mins • 1 pt

Given the following code, which is considered the parameters of the function


function myFunction(a, b, c) {

var x = a + b + c;

}

x

a

b

c

3.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Given the following code, what is the final value of x?


var x = 0;

function myXFunction() {

x = x + 10;

}

x = x + 1;

11

0

10

1

4.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

What should go into the indicated location make the final value of x = 11?


var x = 0;

function myXFunction() {

x = x + 10;

}

WRITE CODE HERE

x = x + 1;

function myXFunction()

MYXFUNCTION()

myXFunction()

myxfunction()

5.

FILL IN THE BLANK QUESTION

10 mins • 1 pt

Fill in the blanks to allow the following button invoke the myFunction function when clicked

<button id="myButton" ________ />

function myFunction() {

//Some Code }

6.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Which of the following code will allow the button to invoke hisFunction?


<button id="myButton" value="Click Me" ________ />


function hisFunction(X, Y) {

//Some Code }

onclick = "hisFunction()"

onclick = "hisFunction"

onclick = "hisFunction(1)"

onclick = "hisFunction(1, 2)"

7.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Media Image

What code will result in the above?

alert("Please enter your phone number:")

confirm("Please enter your phone number:")

prompt("Please enter your phone number:")

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?