0% found this document useful (0 votes)
27 views

Javascript Essentials

JS classnotes

Uploaded by

Chain Smokers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Javascript Essentials

JS classnotes

Uploaded by

Chain Smokers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

You want to create an alert.

Select the correct one------alert('he said "goodbye"


')
What is true about variables------Variables are case sensitive
What option would you specify when inserting code in a web page? script
type="____"-----text/JavaScript,
Is the following a valid variable assignment var product cost = 3.45;------No.
There should be no space in the variable name
What is the ideal place to load the external JavaScript file in your HTML
document----Towards the end of the body to increase the performance of the webpage
Is the following a valid variable definition? var 100apples----No
To display whether a value is a number or not, ____ is used----isNan
Select the statement that has correct JavaScript syntax----console.log("text");
JavaScript has to called inside ________ tags---script

Which statement will return the value false?----var result = (20 === "20") && (50 <
30);
Multiple variables can be created and initialized in a single JavaScript
statement-----true
isNan function returns ______ if the argument is not a number otherwise it is
______-----true/false
Which of the following are not valid in JavaScript?-----"My name is "Harry" "
What is the value of C? var a = 100; var b = "10"; var c = a + b;-----10010

___________ is a pretest loop that will execute until the value of z equals 10----
while (z >10) { z--; }
____ allows you to loop through a block of code as long as the specified condition
is true.-----while
____ is used to exit a loop early.-----break

In JavaScript, object is a container of properties and functions. Properties are


identified by ____ and behavior is identified by _____------variables, functions
Can arrays in JavaScript be extended?----Yes, they can be
What is true about array----Can have combination of data types in a single array
list
To retrieve the day of the month from the Date object, which is the code to select?
var date_obj = new Date(2016,1,1);--------var month_day = date_obj.getDate()
Which is the correct way to create an array in JavaScript? I) var myProg = []; II)
var myArray = ["C","Java","C++","Python"]; III) var myProg = new Array();---- 2&3

In multidimensional array mySubject, which of the following will allow assigning


the value 100 in position 5 of the third mySubject array?-----mySubject[3][5] =
100,mySubject[3][4] = 100

You might also like