HTML Tutorial: JavaScript Fundamentals - Exercises and Answers, Exams of Computer Science

A series of exercises and answers related to javascript fundamentals, covering topics such as built-in objects, functions, variables, and debugging. It's a valuable resource for students learning the basics of javascript programming and web development.

Typology: Exams

2024/2025

Available from 01/10/2025

Classrep02
Classrep02 🇺🇸

3

(2)

2.9K documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
HTML Tutorial 9 QUESTIONS 100%
ANSWERED!!
Which of the following can be referenced only after the browser has finished parsing
the page content? - ANSWERBuilt-in objects
Browser objects
Document objects
A _____ occurs after a script has been successfully loaded with no syntax errors and
is being executed by a browser. - ANSWERrun-time error
Which of the following syntax is used for a function to return a value? -
ANSWERfunction function_name(parameters){
commands
return value;}
Identify a method that repeatedly runs commands at specified time breaks in a
function created. - ANSWERsetInterval("command", interval)
A(n) _____ is any group of characters enclosed within either double or single
quotation marks in JavaScript. - ANSWERtext string
Identify a syntax to access any of the mathematical constants supported by the Math
object. - ANSWERmath.constant
Math.CONSTANT
Math.constant
Which of the following is created by a programmer for use in an application. -
ANSWERCustomized objects
Identify a syntax to set the time-delayed commands. -
ANSWERsetTimeout("command", delay);
Identify a command that displays a dialog box containing the message "Hello
World!". - ANSWERwindow.alert("Hello World!");
_____ programming distributes the load to prevent a server from getting overloaded
with program-related requests. - ANSWERClient-side
Which of the following methods of the Math operator rounds x up to the next highest
integer? - ANSWERMath.ceil(x)
JavaScript code is attached to an HTML file using the _____ element. -
ANSWERscript
A video embedded on a web page is a(n) _____ and has properties such as source
of the video file or the width and height of the video player. - ANSWERobject
pf3

Partial preview of the text

Download HTML Tutorial: JavaScript Fundamentals - Exercises and Answers and more Exams Computer Science in PDF only on Docsity!

HTML Tutorial 9 QUESTIONS 100%

ANSWERED!!

Which of the following can be referenced only after the browser has finished parsing the page content? - ANSWERBuilt-in objects Browser objects Document objects A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser. - ANSWERrun-time error Which of the following syntax is used for a function to return a value? - ANSWERfunction function_name(parameters){ commands return value;} Identify a method that repeatedly runs commands at specified time breaks in a function created. - ANSWERsetInterval("command", interval) A(n) _____ is any group of characters enclosed within either double or single quotation marks in JavaScript. - ANSWERtext string Identify a syntax to access any of the mathematical constants supported by the Math object. - ANSWERmath.constant Math.CONSTANT Math.constant Which of the following is created by a programmer for use in an application. - ANSWERCustomized objects Identify a syntax to set the time-delayed commands. - ANSWERsetTimeout("command", delay); Identify a command that displays a dialog box containing the message "Hello World!". - ANSWERwindow.alert("Hello World!"); _____ programming distributes the load to prevent a server from getting overloaded with program-related requests. - ANSWERClient-side Which of the following methods of the Math operator rounds x up to the next highest integer? - ANSWERMath.ceil(x) JavaScript code is attached to an HTML file using the _____ element. - ANSWERscript A video embedded on a web page is a(n) _____ and has properties such as source of the video file or the width and height of the video player. - ANSWERobject

The _____ attribute can be applied to the script element to ensure that an object can be referenced within a JavaScript program that runs only after the page has completed loading. - ANSWERdefer To break a text string into several lines, which means that the text string continues on the next line, the _____ character should be used. - ANSWERbackslash Identify an expression used to apply a method to an object. - ANSWERobject.object(method) object.method(values) Object.name(values) Developers advocate that JavaScript be run in _____ in which all lapses in syntax result in load-time or run-time errors. - ANSWERstrict mode Identify a syntax for JavaScript function. - ANSWERfunction_name function(parameters){ commands } Identify a function that extracts the first numeric value from the text string. - ANSWERparseFloat(string) A(n) _____ is a named item in a program that stores a data value, such as a number or text string, or an object, such as a part of the web browser or browser window. - ANSWERvariable To avoid fatal errors, it is advised to apply the _____ statement locally only to functions that are created rather than globally as the first line of the script file. - ANSWER"use strict"; "use global"; "use moderate"; The _____ property should be used only when no markup tags are involved. - ANSWERtextContent _____ is the programming language for client-side programs. - ANSWERJavaScript The _____ attribute tells a browser to parse the HTML and JavaScript code together, only pausing to process the script before returning to the HTML file. - ANSWERasync Identify a property used to refer an HTML code that is stored within a page element.

  • ANSWERelement.innerHTML Identify a statement that is added to the first line of the file to run a script in strict mode. - ANSWER"use strict";