SlideShare a Scribd company logo
1 of 8
Download to read offline
Aafreen Shaikh(CSJC, Jalgaon)
Chapter 3 ADVANCED JAVASCRIPT Textbook Solutions
Fill in the blanks.
(1) __________ script resides on server computer.
Answer : Server-Side
(2) __________ statement is used to jump out of loop.
Answer : Break
(3) ____________ defines logical structure of document.
Answer : DOM (Document Object Model)
(4) ___________ property of window object returns Boolean value indicating whether
window is closed or not.
Answer : Closed
(5) ____________ event occurs when an element losses its focus.
Answer : onblur
State whether given statement is true or false.
(1) JavaScript is case sensitive language.
• True
• False
Answer : True
(2) Math.ceil() function is used to return the nearest integer less than or equal to
given number.
• True
• False
Answer : False
(3) MAX_VALUE property of number object returns smallest possible value.
• True
• False
Aafreen Shaikh(CSJC, Jalgaon)
Answer : False
(4) getDay() method of Date object returns month in number.
OPTIONS
• True
• False
Answer : False
(5) onKeydown event occurs when user moves mouse pointer.
• True
• False
Answer : False
Multiple choice questions. Select one correct answer.
(1) JavaScript is ___________ language.
• Compiled
• Interpreted
• Both Compiled and Interpreted
• None of the above
Answer : Both Compiled and Interpreted
(2) Select correct method name of String object ________
• charAt()
• characterAt()
• valueAt()
• lengthAt()
Answer : charAt()
(3) __________ method displays message box with Ok and Cancel button.
• Confirm()
• Alert()
• both Confirm() and Alert()
• None of these
Answer : Confirm()
Aafreen Shaikh(CSJC, Jalgaon)
(4) We can declare all types of variables using keyword ____________
• var
• dim
• variable
• declare
Answer : var
(5) Trace output of following JavaScript code.
var str="Information Technology"; document.write(str.lastlndexOf("o");
OPTIONS
• 18
• 19
• 20
• 21
Answer : 20
Multiple choice questions. Select two correct answer.
(1) Valid two methods of Date object are ___________ and ___________
a) setTime()
b) getValidTime()
c) getTime()
d) setValidTime()
Answe : setTime() and getTime()
(2) Properties of document object are __________ and ___________
a) URL
b) title
c) name
d) status
Answer : URL and title
Aafreen Shaikh(CSJC, Jalgaon)
(3) __________ and ________ are event/event handler used with text object in
JavaScript.
a) onBlur
b) onMove
c) onFocus
d) onAction
Answer : onBlur and onFocus
Multiple choice questions. Select three correct answers.
(1) Select three correct methods of window object __________, __________ and
___________
a) write()
b) alert()
c) writeln()
d) close()
e) open()
f) charAt()
Answer : alert(), close() and open()
(2) JavaScript features are __________, _________ and ____________
a) supports event based facilities
b) is platform dependent language
c) case insensitive scripting language
d) provide inbuilt objects
e) can handle date and time effectively
f) requires special software to run
Answer : upports event based facilities, provide inbuilt objects and can handle date
and time effectively.
Aafreen Shaikh(CSJC, Jalgaon)
(3) Inbuilt objects in JavaScript are _______, ________ and ___________
a) Time
b) Date
c) Inheritance
d) Array
e) Number
f) function
Answer : Date, Array and Number
Explain the following.
(1) What are the similarities and differences between Client-side Scripting and
Server-side Scripting?
Answer :
Client-side Scripting:
1. It is used at the frontend which users can see from the browser.
2. Client-side scripting does not need any server interaction.
3. Client-Side scripting language involves languages such as HTML5, JavaScript,
etc.
4. Client-side scripting is used for validation purposes.
Server-side Scripting:
1. It is used at the backend, where the source code is not visible or hidden in the
client browser.
2. When a server-side script is processed it communicates to the server.
3. Server-side scripting language involves languages such as PHP, ASP.NET,
Python, etc.
4. Server-side scripting is useful in customizing the web pages and implements
dynamic changes in the website.
(2) Briefly explain features of JavaScript.
Answer :
• JavaScript is light weight scripting language.
Aafreen Shaikh(CSJC, Jalgaon)
• No need of special software to run JavaScript Programs
• JavaScript is the object-oriented scripting language
• It can handle date and time very effectively.
• It is a case-sensitive language.
(3) Explain switch case conditional statement in JavaScript with example.
Answer :
JavaScript has a decision control statement known as switch. The switch statement
test the value of given expression against the list of case values and when the match
is found a block of statement associated with that case is executed.
Syntax of switch case is:
switch(expression)
{
case x:
//code block
break;
case y:
//code block
break;
default:
//code block
}
Write event driven JavaScript program for the following.
(1) Write event driven JavaScript program for the following.
Display Addition, subtraction, multiplication, division and remainder of two numbers,
which were accepted from user.
Answer :
<html>
<script type="text/javascript">
var a,b,res;
a=parselnt(prompt("Enter First Number"));
b=parselnt(prompt("Enter Second Number"));
res=a+b;
document.write("<br><br>Addition is"+res);
res=a-b;
document.write("<br><br>Substraction is"+res);
res=a*b;
document.write("<br><br>Multiplication is"+res);
res=a/b;
document.write("<br><br>Division is"+res);
</script>
</html>
(2) Write event driven JavaScript program for the following.
Display number sequence from 100 to 150 in following format.
(100, 101, 102, ............., 150)
Aafreen Shaikh(CSJC, Jalgaon)
Coding:
<html>
<script type="text/javascript">
var i;
document.write("<br>Numbers from 100-150 are <br>");
for(i=100;i<=150;i++)
{
document.write("t"+i);
}
</script>
</html>
(3) Write event driven JavaScript program for the following.
Find and display factorial of given number.
Answer :
Coding:
<html>
<script type="text/javascript">
var n=4,i,f=1;
for(i=n;i>= 1;i--)
{
f=f*i;
}
document.write("<br>Factorial of 4 is"+f);
</script>
</html>
(4) Write event driven JavaScript program for the following.
Accept any string from user and count and display number of vowels occurs in it.
Answer :
Coding:
<html>
<script type="text/javascript">
var n,i,ch,cnt=0;
n=prompt("Enter a String");
for(i=0;i<n.length;i++)
{
ch=n.charAt(i);
if(ch=='a' | | ch==' A' | | ch=='e' | | ch='E' | | ch='i' | | ch=='i' | |
ch=='o' | | ch=='O' | | ch=='u' | | ch=='U')
{
cnt=cnt+1;
}
}
document.write("Number of vowels in string are"+cnt);
</script>
</html>
Aafreen Shaikh(CSJC, Jalgaon)
Match the following.
(1) Match the following.
Column AColumn B
ceil() Writes HTML expression or JavaScript code to a document
floor() Sets focus to current window.
write() Removes white spaces from both sides of string.
focus() Returns next integer greater than or equal to given number.
trim() Returns the next integer less than or equal to given number.
Answer :
Column AColumn B
ceil() Returns next integer greater than or equal to given number.
floor() Returns the next integer less than or equal to given number.
write() Writes HTML expression or JavaScript code to a document
focus() Sets focus to current window.
trim() Removes white spaces from both sides of string.

More Related Content

Similar to Maharashtra state board Hsc IT Chap 3.pdf

Similar to Maharashtra state board Hsc IT Chap 3.pdf (20)

Final Java-script.pptx
Final Java-script.pptxFinal Java-script.pptx
Final Java-script.pptx
 
Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
 
Unit 4(it workshop)
Unit 4(it workshop)Unit 4(it workshop)
Unit 4(it workshop)
 
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP ConceptsDIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
 
Java scipt
Java sciptJava scipt
Java scipt
 
Java script
Java scriptJava script
Java script
 
Ajax and JavaScript Bootcamp
Ajax and JavaScript BootcampAjax and JavaScript Bootcamp
Ajax and JavaScript Bootcamp
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Javascript
JavascriptJavascript
Javascript
 
Java script
 Java script Java script
Java script
 
The Little Unicorn That Could
The Little Unicorn That CouldThe Little Unicorn That Could
The Little Unicorn That Could
 
VBA API for scriptDB primer
VBA API for scriptDB primerVBA API for scriptDB primer
VBA API for scriptDB primer
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
CGI.ppt
CGI.pptCGI.ppt
CGI.ppt
 
Javascript Question
Javascript QuestionJavascript Question
Javascript Question
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]
 
JavaScript client API for Google Apps Script API primer
JavaScript client API for Google Apps Script API primerJavaScript client API for Google Apps Script API primer
JavaScript client API for Google Apps Script API primer
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
 
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass GuaranteeDeveloping Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
 

More from AAFREEN SHAIKH

Hsc computer science Networking technology (1).pdf
Hsc computer science Networking technology (1).pdfHsc computer science Networking technology (1).pdf
Hsc computer science Networking technology (1).pdfAAFREEN SHAIKH
 
Hsc computer science chap 4.HTML2024.pdf
Hsc computer science chap 4.HTML2024.pdfHsc computer science chap 4.HTML2024.pdf
Hsc computer science chap 4.HTML2024.pdfAAFREEN SHAIKH
 
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdf
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdfHsc computer science paper 1 chap 1 OperatingSystem2024.pdf
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdfAAFREEN SHAIKH
 
Hsc computer science chap 1 Operating System (1).pdf
Hsc computer science chap 1 Operating System  (1).pdfHsc computer science chap 1 Operating System  (1).pdf
Hsc computer science chap 1 Operating System (1).pdfAAFREEN SHAIKH
 
Hsc IT 6. E-Commerce and E-Governance_.pdf
Hsc IT 6. E-Commerce and E-Governance_.pdfHsc IT 6. E-Commerce and E-Governance_.pdf
Hsc IT 6. E-Commerce and E-Governance_.pdfAAFREEN SHAIKH
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfAAFREEN SHAIKH
 
Hac IT 4. Emerging Technologies (1).pdf
Hac IT 4. Emerging Technologies  (1).pdfHac IT 4. Emerging Technologies  (1).pdf
Hac IT 4. Emerging Technologies (1).pdfAAFREEN SHAIKH
 
Hsc IT Chap 3. Advanced javascript-1.pdf
Hsc IT Chap 3. Advanced javascript-1.pdfHsc IT Chap 3. Advanced javascript-1.pdf
Hsc IT Chap 3. Advanced javascript-1.pdfAAFREEN SHAIKH
 
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdfAAFREEN SHAIKH
 
1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdfAAFREEN SHAIKH
 
Maharashtra state board exam IT Chap 6.pdf
Maharashtra state board exam IT Chap 6.pdfMaharashtra state board exam IT Chap 6.pdf
Maharashtra state board exam IT Chap 6.pdfAAFREEN SHAIKH
 
Maharashtra state board IT science Chap 5.pdf
Maharashtra state board IT science Chap 5.pdfMaharashtra state board IT science Chap 5.pdf
Maharashtra state board IT science Chap 5.pdfAAFREEN SHAIKH
 
Maharashtra state board IT science Chap 4.pdf
Maharashtra state board IT science Chap 4.pdfMaharashtra state board IT science Chap 4.pdf
Maharashtra state board IT science Chap 4.pdfAAFREEN SHAIKH
 
Maharashtra state board Hsc IT Chap 1 advance web designing.pdf
Maharashtra state board Hsc IT Chap 1 advance web designing.pdfMaharashtra state board Hsc IT Chap 1 advance web designing.pdf
Maharashtra state board Hsc IT Chap 1 advance web designing.pdfAAFREEN SHAIKH
 
JAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdfJAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdfAAFREEN SHAIKH
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdfAAFREEN SHAIKH
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdfAAFREEN SHAIKH
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdfAAFREEN SHAIKH
 

More from AAFREEN SHAIKH (18)

Hsc computer science Networking technology (1).pdf
Hsc computer science Networking technology (1).pdfHsc computer science Networking technology (1).pdf
Hsc computer science Networking technology (1).pdf
 
Hsc computer science chap 4.HTML2024.pdf
Hsc computer science chap 4.HTML2024.pdfHsc computer science chap 4.HTML2024.pdf
Hsc computer science chap 4.HTML2024.pdf
 
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdf
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdfHsc computer science paper 1 chap 1 OperatingSystem2024.pdf
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdf
 
Hsc computer science chap 1 Operating System (1).pdf
Hsc computer science chap 1 Operating System  (1).pdfHsc computer science chap 1 Operating System  (1).pdf
Hsc computer science chap 1 Operating System (1).pdf
 
Hsc IT 6. E-Commerce and E-Governance_.pdf
Hsc IT 6. E-Commerce and E-Governance_.pdfHsc IT 6. E-Commerce and E-Governance_.pdf
Hsc IT 6. E-Commerce and E-Governance_.pdf
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdf
 
Hac IT 4. Emerging Technologies (1).pdf
Hac IT 4. Emerging Technologies  (1).pdfHac IT 4. Emerging Technologies  (1).pdf
Hac IT 4. Emerging Technologies (1).pdf
 
Hsc IT Chap 3. Advanced javascript-1.pdf
Hsc IT Chap 3. Advanced javascript-1.pdfHsc IT Chap 3. Advanced javascript-1.pdf
Hsc IT Chap 3. Advanced javascript-1.pdf
 
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf
2. Introduction to SEO 2 (Search Engine Optimization) (12th IT).pdf
 
1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf
 
Maharashtra state board exam IT Chap 6.pdf
Maharashtra state board exam IT Chap 6.pdfMaharashtra state board exam IT Chap 6.pdf
Maharashtra state board exam IT Chap 6.pdf
 
Maharashtra state board IT science Chap 5.pdf
Maharashtra state board IT science Chap 5.pdfMaharashtra state board IT science Chap 5.pdf
Maharashtra state board IT science Chap 5.pdf
 
Maharashtra state board IT science Chap 4.pdf
Maharashtra state board IT science Chap 4.pdfMaharashtra state board IT science Chap 4.pdf
Maharashtra state board IT science Chap 4.pdf
 
Maharashtra state board Hsc IT Chap 1 advance web designing.pdf
Maharashtra state board Hsc IT Chap 1 advance web designing.pdfMaharashtra state board Hsc IT Chap 1 advance web designing.pdf
Maharashtra state board Hsc IT Chap 1 advance web designing.pdf
 
JAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdfJAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdf
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART II.pdf
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Maharashtra state board Hsc IT Chap 3.pdf

  • 1. Aafreen Shaikh(CSJC, Jalgaon) Chapter 3 ADVANCED JAVASCRIPT Textbook Solutions Fill in the blanks. (1) __________ script resides on server computer. Answer : Server-Side (2) __________ statement is used to jump out of loop. Answer : Break (3) ____________ defines logical structure of document. Answer : DOM (Document Object Model) (4) ___________ property of window object returns Boolean value indicating whether window is closed or not. Answer : Closed (5) ____________ event occurs when an element losses its focus. Answer : onblur State whether given statement is true or false. (1) JavaScript is case sensitive language. • True • False Answer : True (2) Math.ceil() function is used to return the nearest integer less than or equal to given number. • True • False Answer : False (3) MAX_VALUE property of number object returns smallest possible value. • True • False
  • 2. Aafreen Shaikh(CSJC, Jalgaon) Answer : False (4) getDay() method of Date object returns month in number. OPTIONS • True • False Answer : False (5) onKeydown event occurs when user moves mouse pointer. • True • False Answer : False Multiple choice questions. Select one correct answer. (1) JavaScript is ___________ language. • Compiled • Interpreted • Both Compiled and Interpreted • None of the above Answer : Both Compiled and Interpreted (2) Select correct method name of String object ________ • charAt() • characterAt() • valueAt() • lengthAt() Answer : charAt() (3) __________ method displays message box with Ok and Cancel button. • Confirm() • Alert() • both Confirm() and Alert() • None of these Answer : Confirm()
  • 3. Aafreen Shaikh(CSJC, Jalgaon) (4) We can declare all types of variables using keyword ____________ • var • dim • variable • declare Answer : var (5) Trace output of following JavaScript code. var str="Information Technology"; document.write(str.lastlndexOf("o"); OPTIONS • 18 • 19 • 20 • 21 Answer : 20 Multiple choice questions. Select two correct answer. (1) Valid two methods of Date object are ___________ and ___________ a) setTime() b) getValidTime() c) getTime() d) setValidTime() Answe : setTime() and getTime() (2) Properties of document object are __________ and ___________ a) URL b) title c) name d) status Answer : URL and title
  • 4. Aafreen Shaikh(CSJC, Jalgaon) (3) __________ and ________ are event/event handler used with text object in JavaScript. a) onBlur b) onMove c) onFocus d) onAction Answer : onBlur and onFocus Multiple choice questions. Select three correct answers. (1) Select three correct methods of window object __________, __________ and ___________ a) write() b) alert() c) writeln() d) close() e) open() f) charAt() Answer : alert(), close() and open() (2) JavaScript features are __________, _________ and ____________ a) supports event based facilities b) is platform dependent language c) case insensitive scripting language d) provide inbuilt objects e) can handle date and time effectively f) requires special software to run Answer : upports event based facilities, provide inbuilt objects and can handle date and time effectively.
  • 5. Aafreen Shaikh(CSJC, Jalgaon) (3) Inbuilt objects in JavaScript are _______, ________ and ___________ a) Time b) Date c) Inheritance d) Array e) Number f) function Answer : Date, Array and Number Explain the following. (1) What are the similarities and differences between Client-side Scripting and Server-side Scripting? Answer : Client-side Scripting: 1. It is used at the frontend which users can see from the browser. 2. Client-side scripting does not need any server interaction. 3. Client-Side scripting language involves languages such as HTML5, JavaScript, etc. 4. Client-side scripting is used for validation purposes. Server-side Scripting: 1. It is used at the backend, where the source code is not visible or hidden in the client browser. 2. When a server-side script is processed it communicates to the server. 3. Server-side scripting language involves languages such as PHP, ASP.NET, Python, etc. 4. Server-side scripting is useful in customizing the web pages and implements dynamic changes in the website. (2) Briefly explain features of JavaScript. Answer : • JavaScript is light weight scripting language.
  • 6. Aafreen Shaikh(CSJC, Jalgaon) • No need of special software to run JavaScript Programs • JavaScript is the object-oriented scripting language • It can handle date and time very effectively. • It is a case-sensitive language. (3) Explain switch case conditional statement in JavaScript with example. Answer : JavaScript has a decision control statement known as switch. The switch statement test the value of given expression against the list of case values and when the match is found a block of statement associated with that case is executed. Syntax of switch case is: switch(expression) { case x: //code block break; case y: //code block break; default: //code block } Write event driven JavaScript program for the following. (1) Write event driven JavaScript program for the following. Display Addition, subtraction, multiplication, division and remainder of two numbers, which were accepted from user. Answer : <html> <script type="text/javascript"> var a,b,res; a=parselnt(prompt("Enter First Number")); b=parselnt(prompt("Enter Second Number")); res=a+b; document.write("<br><br>Addition is"+res); res=a-b; document.write("<br><br>Substraction is"+res); res=a*b; document.write("<br><br>Multiplication is"+res); res=a/b; document.write("<br><br>Division is"+res); </script> </html> (2) Write event driven JavaScript program for the following. Display number sequence from 100 to 150 in following format. (100, 101, 102, ............., 150)
  • 7. Aafreen Shaikh(CSJC, Jalgaon) Coding: <html> <script type="text/javascript"> var i; document.write("<br>Numbers from 100-150 are <br>"); for(i=100;i<=150;i++) { document.write("t"+i); } </script> </html> (3) Write event driven JavaScript program for the following. Find and display factorial of given number. Answer : Coding: <html> <script type="text/javascript"> var n=4,i,f=1; for(i=n;i>= 1;i--) { f=f*i; } document.write("<br>Factorial of 4 is"+f); </script> </html> (4) Write event driven JavaScript program for the following. Accept any string from user and count and display number of vowels occurs in it. Answer : Coding: <html> <script type="text/javascript"> var n,i,ch,cnt=0; n=prompt("Enter a String"); for(i=0;i<n.length;i++) { ch=n.charAt(i); if(ch=='a' | | ch==' A' | | ch=='e' | | ch='E' | | ch='i' | | ch=='i' | | ch=='o' | | ch=='O' | | ch=='u' | | ch=='U') { cnt=cnt+1; } } document.write("Number of vowels in string are"+cnt); </script> </html>
  • 8. Aafreen Shaikh(CSJC, Jalgaon) Match the following. (1) Match the following. Column AColumn B ceil() Writes HTML expression or JavaScript code to a document floor() Sets focus to current window. write() Removes white spaces from both sides of string. focus() Returns next integer greater than or equal to given number. trim() Returns the next integer less than or equal to given number. Answer : Column AColumn B ceil() Returns next integer greater than or equal to given number. floor() Returns the next integer less than or equal to given number. write() Writes HTML expression or JavaScript code to a document focus() Sets focus to current window. trim() Removes white spaces from both sides of string.