Chapter 6 : JavaScript Functions & Input/ Output

Chapter 6 : JavaScript Functions & Input/ Output

Professional Development

12 Qs

quiz-placeholder

Similar activities

1er Taller evaluativo Info & Tech Undécimo IIIP

1er Taller evaluativo Info & Tech Undécimo IIIP

Professional Development

10 Qs

Scratch!

Scratch!

4th Grade - Professional Development

8 Qs

BIS - Database

BIS - Database

Professional Development

12 Qs

all star

all star

Professional Development

10 Qs

JAVA - Arrays

JAVA - Arrays

University - Professional Development

15 Qs

OOP Belitung

OOP Belitung

Professional Development

10 Qs

Big Data Analytics - Week 2 (Data storage)

Big Data Analytics - Week 2 (Data storage)

University - Professional Development

10 Qs

Java Displaying Data & Data Types

Java Displaying Data & Data Types

University - Professional Development

12 Qs

Chapter 6 : JavaScript Functions & Input/ Output

Chapter 6 : JavaScript Functions & Input/ Output

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

JX C

Used 17+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 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

45 sec • 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

30 sec • 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

30 sec • 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.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the final value of x be?


var x = 0;

function myXFunction() {

return 10;

}

x = x + 1;

x = myXFunction();

11

0

10

1

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Given the following function.


function myFunction () {

//Some Code }


Which of the code below will allow the following button to invoke myFunction?


<input type="button" id="mybutton" value="Click Me"/>

var h = document.getElementById(“mybutton”); h.addEventListener(“click”, myFunction);

var h = document.getElementById(“mybutton”);

h.onclick(myFunction);

document.getElementById(“mybutton”).addEventListener(“click”, myFunction);

document.getElementById(“mybutton”).onclick(myFunction);

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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


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


function myFunction() {

//Some Code }

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?