Deck 9: Getting Started With Javascript

ملء الشاشة (f)
exit full mode
سؤال
Server-side and client-side programming are the two main types of web-based programming.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
If no value is assigned to a Boolean variable,it is interpreted as having a value of true.
سؤال
A variable requires an initial value to be defined.
سؤال
An Infinity value is generated for an operation whose result is less than the smallest numeric value.
سؤال
JavaScript supports methodsto change the date stored within a Date object.
سؤال
In JavaScript,the clearTimeout()method is used to clear all repeated commands.
سؤال
A logical error is the easiest to fix as the errors in the code can be traced easily.
سؤال
JavaScript is case sensitive.
سؤال
The first character of a variable must be a numeral or an underscore character ( _ ).
سؤال
An object can be modified by changing its properties or by applying a method.
سؤال
JavaScript is a procedural language that needs a compiler to translate the code into machine language.
سؤال
Parameters are treated as variables within a function.
سؤال
The script element can be placed anywhere within the HTML document.
سؤال
Any command that references a document object before the browser has parsed the HTML code will result in an error because those objects do not yet reside in memory.
سؤال
There is no limit to the number of time-delayed commands a browser can process.
سؤال
The async attribute stalls script processing until after the page has been completely parsed and loaded.
سؤال
Both HTML tags and text content can be returned by the innerHTML property.
سؤال
JavaScript comments can be entered on single or multiple lines.
سؤال
JavaScript demands strict application of rules for syntax and program structure.
سؤال
The Math.round(x)method rounds the value of x down to the next lowest integer.
سؤال
A command that indicates an action for the browser to take should end with a _____.

A) ​semicolon
B) ​backslash
C) ​colon
D) ​forward slash
سؤال
_____ is the programming language for client-side programs.

A) ​Perl
B) ​JavaScript
C) ​C#
D) ​PHP
سؤال
Identify a shortcut key on the keyboard to open the debugging tools.

A) ​F9
B) ​F12
C) ​F8
D) ​F10
سؤال
Identify a command that displays a dialog box containing the message "Hello World!".

A) ​Window.alert("Hello World!");
B) ​Window.Alert("Hello World!");
C) ​window.alert("Hello World!");
D) ​window.Alert("Hello World!");
سؤال
JavaScript code is attached to an HTML file using the _____ element.

A) ​label
B) ​java
C) ​script
D) ​ attach
سؤال
_____ programming distributes the load to prevent a server from getting overloaded with program-related requests.

A) ​Client-side
B) ​Server-side
C) ​Inductive
D) ​Semantic
سؤال
_____ are intrinsic to the JavaScript language.

A) ​Built-in objects
B) ​Event-driven objects
C) ​Browser objects
D) ​Customized objects
سؤال
Developers advocate that JavaScript be run in _____ in which all lapses in syntax result in load-time or run-time errors.

A) ​protect mode
B) ​private mode
C) ​safe mode
D) ​strict mode
سؤال
_____ is the process of locating and fixing a programming error.

A) ​Scripting
B) ​Buffering
C) ​Debugging
D) ​Booting
سؤال
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.

A) ​class
B) ​method
C) ​object
D) ​event
سؤال
The isNaN(value)function returns a Boolean value of true if the value is not numeric.
سؤال
Which of the following is created by a programmer for use in an application.

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
سؤال
Identify a statement that is added to the first line of the file to run a script in strict mode.

A) ​"use strict";
B) ​"mode strict";
C) ​use: strict
D) ​mode: strict
سؤال
A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.

A) ​load-time error
B) ​run-time error
C) ​logical error
D) ​fatal error
سؤال
JavaScript is used as a programming tool for:

A) ​managing databases.
B) ​designing style sheets for websites.
C) ​creating interactive web forms and animated graphics.
D) ​providing virtual reality,diagnosis,and nonlinear controls.
سؤال
The technique for locating the source of an error is to set up _____,which are locations where the browser will pause the program,allowing the programmer to determine the error at that position.

A) ​breakpoints
B) ​thresholds
C) ​blocks
D) ​lapses
سؤال
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.

A) ​"use strict";
B) ​"use local";
C) ​"use global";
D) ​"use moderate";
سؤال
To break a text string into several lines,which means that the text string continues on the next line,the _____ character should be used.

A) ​forward slash
B) ​backslash
C) ​colon
D) ​semicolon
سؤال
A user can create an embedded script by removing the _____ attribute and placing all of the JavaScript code within the script element.

A) ​method
B) ​src
C) ​enctype
D) ​id
سؤال
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.

A) ​async
B) ​defer
C) ​src
D) ​type
سؤال
Identify a command that uses the dateDiv variable to refer the page element with ID dateNow.

A) ​var dateDiv = document.getElementById("dateNow");
B) ​var dateNow = document.getElementById(dateDiv),
C) ​var dateNow = document.getElementById("dateDiv");
D) ​ var dateDiv = document.getElementById(dateNow),
سؤال
The _____ property should be used only when no markup tags are involved.

A) ​innerHTML
B) ​outerHTML
C) ​textContent
D) ​insertAdjacentHTML
سؤال
Identify a return value for the expression 5/"A" using JavaScript.

A) ​5
B) ​NaN
C) ​Infinity
D) ​A
سؤال
A(n) _____ is a collection of commands that performs an action or returns a value.

A) ​function
B) ​argument
C) ​entity
D) ​pointer
سؤال
Identify the output of the following code.
Var x = 8;
Var y = 6;

A) ​56
B) ​48
C) ​28
D) ​96
سؤال
Which of the following syntax is used for a function to return a value?

A) ​return value;
Function_name(parameters){
Commands
}
B) ​function
Return value;
{
Function_name(parameters)
Commands
}
C) function function_name(parameters){
Commands
Return value;}
D) function_name(parameters)
{
Return value;
Commands
}
سؤال
Identify a method that repeatedly runs commands at specified time breaks in a function created.

A) ​setInterval("command",interval)
B) ​setTimeout("command",interval)
C) ​setTimeout(interval,delay)
D) ​setInterval(interval,delay)
سؤال
Identify an expression used to apply a method to an object.

A) ​object.object(method)
B) ​Object.name(method)
C) ​object.method(values)
D) ​Object.name(values)
سؤال
Identify a syntax to access any of the mathematical constants supported by the Math object.

A) ​math.constant
B) ​Math.CONSTANT
C) ​math.CONSTANT
D) ​Math.constant
سؤال
Identify a syntax for JavaScript function.

A) ​function_name function(parameters){
Commands
}

B) ​Function_name function(commands){
Parameters
}

C) ​function_name function(parameters){
Commands
}
D) ​Function function_name(commands){
Parameters
}
سؤال
Objects are organized into groups called _____.

A) ​object collections
B) ​object pools
C) ​object buckets
D) ​object topologies
سؤال
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.

A) ​variable
B) ​entity
C) ​constant
D) ​class
سؤال
Identify an expression that can be used to refer an element by its id attribute.

A) ​document.getElementById(id)
B) ​Document.getElementbyID(id)
C) ​document.getelementById(id)
D) ​Document.getelementByID(id)
سؤال
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.

A) ​async
B) ​defer
C) ​charset
D) ​type
سؤال
Identify a property used to refer an HTML code that is stored within a page element.

A) ​element.innerHTML
B) ​element.textContent
C) ​element.offsetTop
D) ​element.insertAdjacentHTML
سؤال
A(n)_____ is any group of characters enclosed within either double or single quotation marks in JavaScript.

A) ​entity
B) ​text string
C) ​null value
D) ​object
سؤال
Which of the following can be referenced only after the browser has finished parsing the page content?

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
سؤال
Which of the following methods of the Math operator rounds x up to the next highest integer?

A) ​Math.round(x)
B) ​Math.ceil(x)
C) ​Math.rand(x)
D) ​Math.floor(x)
سؤال
Identify a syntax to set the time-delayed commands.

A) ​SettimeOut(delay);
B) ​Setinterval(interval);
C) ​setTimeout("command",delay);
D) ​setInterval("command",interval);
سؤال
Identify an expression that defines a date object.

A) ​new Date("month,day,year hrs:mins:secs");
B) ​new Date("month day,year" "hrs:mins:secs");
C) ​new Date("month day,year hrs:mins:secs");
D) ​new Date("month,day,year" hrs:mins:secs);
سؤال
Document objects are organized in hierarchical structures called the _________.
سؤال
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Terin wants to create an object that will contain information about the browser application.Which of the following objects must Terin create to accomplish this?

A) navigator object
B) location object
C) history object
D) document object
سؤال
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Identify an expression that Robin must use to define the current date on the web page.

A) new Date(year,month,day,hrs,mins,secs);
B) new date("hrs","mins","secs","day","month","year");
C) this.day(hrs,mins,secs,year,month,day),
D) this Day("day","month","hrs","mins","secs","year"),
سؤال
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
Identify the value for the month that will be displayed on the web page by using thisDay.getMonth()method.

A) -35
B) -4
C) -14
D) -3
سؤال
When writing an HTML code,changing the value of the _________ property overwrites whatever content is currently contained within the selected object.
سؤال
A _________ is a JavaScript command that is run after a specified amount of time has passed.
سؤال

Identify the property that best matches the following style rules.

-It is indicated by the - - symbol,which reduces the operand's value by 1.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
سؤال

Identify the property that best matches the following style rules.

-It is a command to create a dialog box containing a message.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
سؤال

Identify the property that best matches the following style rules.

-It is an object collection in which all the elements are marked with the < a > tag.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
سؤال
The _________ error occurs when a script is first loaded by a browser.
سؤال
The variables or expressions that operators act upon are called _________.
سؤال
The browser halts loading a script before trying to execute it if a(n)_________ is detected.
سؤال
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
He also includes the method thisDay.getDay()in the code.What is the result for the given method?

A) 1
B) 3
C) 4
D) 5
سؤال
JavaScript includes _________ in its time calculations due to which the seconds value in the countdown clock is off by a second.
سؤال

Identify the property that best matches the following style rules.

-It returns a text string displaying value to n significant digits either to the left or to the right of the decimal point.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
سؤال
Identify a function that extracts the first numeric value from the text string.

A) ​parseInt(string)
B) ​parseFloat(string)
C) ​isFinite(value)
D) ​isNaN(value)
سؤال
JavaScript dates are stored as numeric values equal to the number of _________ between the specified date and January 1,1970 at midnight.
سؤال
A(n)_________ is an entity within the browser or web page that has properties that define it and methods that can be acted upon it.
سؤال
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Identify an object created by Terin that will contain information about the current URL.

A) history object
B) screen object
C) ocation object
D) navigator object
سؤال
A(n)_________ can be created by omitting the src attribute and placing all of the JavaScript code within the script element so that an external file need not be used.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/89
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Getting Started With Javascript
1
Server-side and client-side programming are the two main types of web-based programming.
True
2
If no value is assigned to a Boolean variable,it is interpreted as having a value of true.
False
3
A variable requires an initial value to be defined.
False
4
An Infinity value is generated for an operation whose result is less than the smallest numeric value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
5
JavaScript supports methodsto change the date stored within a Date object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
6
In JavaScript,the clearTimeout()method is used to clear all repeated commands.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
7
A logical error is the easiest to fix as the errors in the code can be traced easily.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
8
JavaScript is case sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
9
The first character of a variable must be a numeral or an underscore character ( _ ).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
10
An object can be modified by changing its properties or by applying a method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
11
JavaScript is a procedural language that needs a compiler to translate the code into machine language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
12
Parameters are treated as variables within a function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
13
The script element can be placed anywhere within the HTML document.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
14
Any command that references a document object before the browser has parsed the HTML code will result in an error because those objects do not yet reside in memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
15
There is no limit to the number of time-delayed commands a browser can process.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
16
The async attribute stalls script processing until after the page has been completely parsed and loaded.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
17
Both HTML tags and text content can be returned by the innerHTML property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
18
JavaScript comments can be entered on single or multiple lines.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
19
JavaScript demands strict application of rules for syntax and program structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
20
The Math.round(x)method rounds the value of x down to the next lowest integer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
21
A command that indicates an action for the browser to take should end with a _____.

A) ​semicolon
B) ​backslash
C) ​colon
D) ​forward slash
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
22
_____ is the programming language for client-side programs.

A) ​Perl
B) ​JavaScript
C) ​C#
D) ​PHP
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
23
Identify a shortcut key on the keyboard to open the debugging tools.

A) ​F9
B) ​F12
C) ​F8
D) ​F10
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
24
Identify a command that displays a dialog box containing the message "Hello World!".

A) ​Window.alert("Hello World!");
B) ​Window.Alert("Hello World!");
C) ​window.alert("Hello World!");
D) ​window.Alert("Hello World!");
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
25
JavaScript code is attached to an HTML file using the _____ element.

A) ​label
B) ​java
C) ​script
D) ​ attach
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
26
_____ programming distributes the load to prevent a server from getting overloaded with program-related requests.

A) ​Client-side
B) ​Server-side
C) ​Inductive
D) ​Semantic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
27
_____ are intrinsic to the JavaScript language.

A) ​Built-in objects
B) ​Event-driven objects
C) ​Browser objects
D) ​Customized objects
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
28
Developers advocate that JavaScript be run in _____ in which all lapses in syntax result in load-time or run-time errors.

A) ​protect mode
B) ​private mode
C) ​safe mode
D) ​strict mode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
29
_____ is the process of locating and fixing a programming error.

A) ​Scripting
B) ​Buffering
C) ​Debugging
D) ​Booting
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
30
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.

A) ​class
B) ​method
C) ​object
D) ​event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
31
The isNaN(value)function returns a Boolean value of true if the value is not numeric.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
32
Which of the following is created by a programmer for use in an application.

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
33
Identify a statement that is added to the first line of the file to run a script in strict mode.

A) ​"use strict";
B) ​"mode strict";
C) ​use: strict
D) ​mode: strict
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
34
A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.

A) ​load-time error
B) ​run-time error
C) ​logical error
D) ​fatal error
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
35
JavaScript is used as a programming tool for:

A) ​managing databases.
B) ​designing style sheets for websites.
C) ​creating interactive web forms and animated graphics.
D) ​providing virtual reality,diagnosis,and nonlinear controls.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
36
The technique for locating the source of an error is to set up _____,which are locations where the browser will pause the program,allowing the programmer to determine the error at that position.

A) ​breakpoints
B) ​thresholds
C) ​blocks
D) ​lapses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
37
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.

A) ​"use strict";
B) ​"use local";
C) ​"use global";
D) ​"use moderate";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
38
To break a text string into several lines,which means that the text string continues on the next line,the _____ character should be used.

A) ​forward slash
B) ​backslash
C) ​colon
D) ​semicolon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
39
A user can create an embedded script by removing the _____ attribute and placing all of the JavaScript code within the script element.

A) ​method
B) ​src
C) ​enctype
D) ​id
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
40
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.

A) ​async
B) ​defer
C) ​src
D) ​type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
41
Identify a command that uses the dateDiv variable to refer the page element with ID dateNow.

A) ​var dateDiv = document.getElementById("dateNow");
B) ​var dateNow = document.getElementById(dateDiv),
C) ​var dateNow = document.getElementById("dateDiv");
D) ​ var dateDiv = document.getElementById(dateNow),
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
42
The _____ property should be used only when no markup tags are involved.

A) ​innerHTML
B) ​outerHTML
C) ​textContent
D) ​insertAdjacentHTML
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
43
Identify a return value for the expression 5/"A" using JavaScript.

A) ​5
B) ​NaN
C) ​Infinity
D) ​A
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
44
A(n) _____ is a collection of commands that performs an action or returns a value.

A) ​function
B) ​argument
C) ​entity
D) ​pointer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
45
Identify the output of the following code.
Var x = 8;
Var y = 6;

A) ​56
B) ​48
C) ​28
D) ​96
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
46
Which of the following syntax is used for a function to return a value?

A) ​return value;
Function_name(parameters){
Commands
}
B) ​function
Return value;
{
Function_name(parameters)
Commands
}
C) function function_name(parameters){
Commands
Return value;}
D) function_name(parameters)
{
Return value;
Commands
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
47
Identify a method that repeatedly runs commands at specified time breaks in a function created.

A) ​setInterval("command",interval)
B) ​setTimeout("command",interval)
C) ​setTimeout(interval,delay)
D) ​setInterval(interval,delay)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
48
Identify an expression used to apply a method to an object.

A) ​object.object(method)
B) ​Object.name(method)
C) ​object.method(values)
D) ​Object.name(values)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
49
Identify a syntax to access any of the mathematical constants supported by the Math object.

A) ​math.constant
B) ​Math.CONSTANT
C) ​math.CONSTANT
D) ​Math.constant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
50
Identify a syntax for JavaScript function.

A) ​function_name function(parameters){
Commands
}

B) ​Function_name function(commands){
Parameters
}

C) ​function_name function(parameters){
Commands
}
D) ​Function function_name(commands){
Parameters
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
51
Objects are organized into groups called _____.

A) ​object collections
B) ​object pools
C) ​object buckets
D) ​object topologies
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
52
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.

A) ​variable
B) ​entity
C) ​constant
D) ​class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
53
Identify an expression that can be used to refer an element by its id attribute.

A) ​document.getElementById(id)
B) ​Document.getElementbyID(id)
C) ​document.getelementById(id)
D) ​Document.getelementByID(id)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
54
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.

A) ​async
B) ​defer
C) ​charset
D) ​type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
55
Identify a property used to refer an HTML code that is stored within a page element.

A) ​element.innerHTML
B) ​element.textContent
C) ​element.offsetTop
D) ​element.insertAdjacentHTML
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
56
A(n)_____ is any group of characters enclosed within either double or single quotation marks in JavaScript.

A) ​entity
B) ​text string
C) ​null value
D) ​object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
57
Which of the following can be referenced only after the browser has finished parsing the page content?

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
58
Which of the following methods of the Math operator rounds x up to the next highest integer?

A) ​Math.round(x)
B) ​Math.ceil(x)
C) ​Math.rand(x)
D) ​Math.floor(x)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
59
Identify a syntax to set the time-delayed commands.

A) ​SettimeOut(delay);
B) ​Setinterval(interval);
C) ​setTimeout("command",delay);
D) ​setInterval("command",interval);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
60
Identify an expression that defines a date object.

A) ​new Date("month,day,year hrs:mins:secs");
B) ​new Date("month day,year" "hrs:mins:secs");
C) ​new Date("month day,year hrs:mins:secs");
D) ​new Date("month,day,year" hrs:mins:secs);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
61
Document objects are organized in hierarchical structures called the _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
62
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Terin wants to create an object that will contain information about the browser application.Which of the following objects must Terin create to accomplish this?

A) navigator object
B) location object
C) history object
D) document object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
63
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Identify an expression that Robin must use to define the current date on the web page.

A) new Date(year,month,day,hrs,mins,secs);
B) new date("hrs","mins","secs","day","month","year");
C) this.day(hrs,mins,secs,year,month,day),
D) this Day("day","month","hrs","mins","secs","year"),
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
64
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
Identify the value for the month that will be displayed on the web page by using thisDay.getMonth()method.

A) -35
B) -4
C) -14
D) -3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
65
When writing an HTML code,changing the value of the _________ property overwrites whatever content is currently contained within the selected object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
66
A _________ is a JavaScript command that is run after a specified amount of time has passed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
67

Identify the property that best matches the following style rules.

-It is indicated by the - - symbol,which reduces the operand's value by 1.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
68

Identify the property that best matches the following style rules.

-It is a command to create a dialog box containing a message.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
69

Identify the property that best matches the following style rules.

-It is an object collection in which all the elements are marked with the < a > tag.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
70
The _________ error occurs when a script is first loaded by a browser.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
71
The variables or expressions that operators act upon are called _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
72
The browser halts loading a script before trying to execute it if a(n)_________ is detected.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
73
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
He also includes the method thisDay.getDay()in the code.What is the result for the given method?

A) 1
B) 3
C) 4
D) 5
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
74
JavaScript includes _________ in its time calculations due to which the seconds value in the countdown clock is off by a second.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
75

Identify the property that best matches the following style rules.

-It returns a text string displaying value to n significant digits either to the left or to the right of the decimal point.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
76
Identify a function that extracts the first numeric value from the text string.

A) ​parseInt(string)
B) ​parseFloat(string)
C) ​isFinite(value)
D) ​isNaN(value)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
77
JavaScript dates are stored as numeric values equal to the number of _________ between the specified date and January 1,1970 at midnight.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
78
A(n)_________ is an entity within the browser or web page that has properties that define it and methods that can be acted upon it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
79
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Identify an object created by Terin that will contain information about the current URL.

A) history object
B) screen object
C) ocation object
D) navigator object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
80
A(n)_________ can be created by omitting the src attribute and placing all of the JavaScript code within the script element so that an external file need not be used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 89 في هذه المجموعة.