11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil இயற்கை வேளாண்மை,சுற்றுச்சூழல் -செய்யுள் - மனோன்மணீயம் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil என்னுயிர் என்பேன் -துணைப்பாடம் - இசைத்தமிழர் இருவர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மொழி கலை -செய்யுள் - ஒவ்வொரு புல்லையும் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - இலக்கணம் - பகுபத உறுப்புகள் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - துணைப்பாடம் - வாடிவாசல் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - குறுந்தொகை Important Questions And Answers Study Material - QB365 Set A

Published on: 12/10/2019
JavaScript Functions
Download Tamil Nadu 11th Standard Computer Applications question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Applications Test

1.
Which library function returns the element that has the ID attribute with the specified value_______.
is NAN ( )
stElementBy ID ( )
getelement By ID ( )
get element ID ( )
2.
The result of "Sura" length() is _______.
3
4
"sura"
sura.4
3.
The punctuator used to identify the function is _______.
{ }
< >
( )
[ ]
4.
The result of parseFloat("5.68") is __________.
5
5.6
5.68
error
5.
Which of the following is not a library function?
prompt()
script()
write()
is NaN()
6.
How many types of functions in JavaScript supports?
2
3
4
many
7.
Which of the following is defined once but invoked any number of times in JavaScript?
Branch
Loop
Function
Script
8.
Which of the following is used to enhance reusability and program clarity.
functions
modules
sets
instructions
9.
Larger programs are divided into smaller are called
modules
block
sets
Group
10.
The parameters work as
Local variable
Global Variable
File variable
block variable
11.
List some pre-defined functions
12.
What is pre-defined function?
13.
Write a note on is NAN ( ) function.
14.
What are the two types of functions supports by JavaScript?
15.
Write the syntax of functions.
16.
Write a note on user defined functions.
17.
What is the use of function?
18.
What is a function in JavaScript?
19.
Tabulate some pre-defined functions and its function with an example.
20.
Write a program in JavaScript to find the sum of 10 numbers using function.
21.
Write a program in JavaScript to find the cube of a number using function.
22.
Write a program in JavaScript for adding two numbers using function.
23.
Write a JavaScript to find sum of two numbers using function.
24.
Explain the followingfunctions with an example.
(i) touppercase ( )
(ii) tolowercase ( )
(iii) length()
(iv) parselnt()
(v) parseFloat()
1.
(c)
getelement By ID ( )
2.
(b)
4
3.
(c)
( )
4.
(c)
5.68
5.
(b)
script()
6.
(a)
2
7.
(c)
Function
8.
(a)
functions
9.
(a)
modules
10.
(a)
Local variable
11.
The following are pre-defined functions in JavaScript.
1. isNaN ( )
2. toUpperCase( )
3. toLowerCase( )
4. length( )
5. alertt( )
6. promptt ( )
7. write( )
12.
Pre-defined functions:
Pre-defined functions are already defined in the JavaScript library which are also called Library functions.
13.
(i) The is NaN ( ) function is used to check whether the given value or variable is valid number.
(ii) This function returns true if the given value is not a number. For example isNaN("12"), is NaN ("A").
14.
JavaScript supports two types functions. They are
(i) Pre-defined or Library Functions.
(ii) User-defined Functions.
15.
The format of a functions definition is
Function function-name(parametets list)
16.
User-defined functions allow the programmer to modularize a program. Most computer programs that solve real-world problems are much large, occupy more space in the computer memory and takes more time to execute. Hence such large programs are divided into small programs called modules.
17.
Functions are used to encapsulate code that performs. a specific task. Sometimes functions are defined for commonly required tasks to avoid the repetition entailed in typing the same statements over and over. More generally, they are used to keep the code that performs a particular job in one place in order to enhance reusability and program clarity.
18.
A function is a block ofJavaScript code that is defined once but may be executed or invoked any number of times.
19.
| Function | Description | Example | Result |
| toUpperCase( ) | Used to convertgiven string into uppercase | x="java" x.toUpperCase( ); | JAVA |
| to Lower Case ( ) | Used to convert given string into lowercase | x="JAVA" x.toLowerCase( ); | java |
| length | Used to find length of the given string | x="JAVA" x.length( ); | 4 |
| parselnti ( ) | Used to convert the given float value into an integer | parselnt(34.234); | 34 |
| parseFloat( ) | Used to convert the given string into a integer | parseInt(34.23"); | 34.23 |
20.
< html >
< body >
< script language = "JavaScript" type "text/ JavaScript" >
var N;
var N = prompt("Enter the N terms", "O");
var x = parse Int(N);
var s = sum(x);
document.write in("The sum of 10 numbers = "+8);
function sum (x)
{
var s = 0;
var s = (x*(x + 1))/2;
return s ;
}
return
< /script >
< /body >
< /html >
21.
Program to find the cube of a number:
< html >
< body >
< script language = "JavaScript" type = "text/ JavaScript" >
var N = window.prompt("Enter the number to find cube" ,"O")',
var x = parse Int(N);
vary s = cube (x);
document, written ("The cube of a number" + x + "is" +s); function cube(m)
{
var s = m*m*m;
returns s ;
}
< /script >
< /body >
< /html >
22.
HTML CODE
< htm l>
< head >
< title >Function Example</title >
< script type = "textjJavaScript ">
< !--
var input1 = window.promptC'Enter valuer :': "0'');
var input2 = window.promptC'Enter Value2 :': "0'');
var vi = parselnt(inputl);
var v2 = parselnt(input2);
var s = sum(v1,v2);
document. writelru" < br > < h4 > < u >Example for
Function</u> < /h4 >'');
document.writelnC'First No :" + vi + " <br>
Second No :" + v2 + "<br> The Sum > " + s);
function sum(x, Y)
{
var s=x+v;
return s;
}
//=>
< /scrip t>
< /head >
< body >
< /body >
< /html >

23.
< html >
< head >
< title > Function Example < /title >
< script type = "text/JavaScript'' >
var input 1 = window.prompt("Enter Valuel :", "0");
var input2=Window.prompuEnter Value2:","0");
var v1=parselnt(input1);
var v2=parselnt(input2);
var s=sum(v1,v2);
document. writeln(" < br > < h4 >< u > Example for
Function< /u >< /h4 >");
document. writeln("First No: "+v 1+< br > Second
No:"+ v2+"< br >The Sum = " + s);
function sum(x, y)
{
var s=x+y;
return s;
}
< /script >
< /head >
< body >
< /body >
< /html >
24.
| Function | Description | Example | Result |
| toUpperCase() | Used to convert given string into uppercase | x="java" x.toUpperCase(); |
JAVA |
| toLowerCase() | Used to convert given string into lowercase | x="JAVA" x.toLowerCase(); |
java |
| length | Used to find length of the given string | x="JAVA" x.length(); |
4 |
| parselnt() | Used to convert the given float value into an integer | parselnt(34.234); | 34 |
| parseFloat() | Used to convert the given string into a integer | parseInt("34.23"); | 34.23 |
11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - காவடிச்சிந்து Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - உரைநடை - மலை இடப்பெயர்கள் : ஓர் ஆய்வு Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - துணைப்பாடம் - யானை டாக்டர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - செய்யுள் - ஐங்குறுநூறு Important Questions And Answers Study Material - QB365 Set A
Tamilnadu Stateboard 11th Standard Subjects

Maths

Commerce

Economics

Biology

Business Maths and Statistics

Accountancy

Computer Science

Physics

Chemistry

Maths

Biology

Economics

Physics

Chemistry

History

Business Maths and Statistics

Computer Science

Accountancy

Computer Applications

History

Computer Technology

Commerce

Computer Applications

Computer Technology

Tamil

English

French
Tamilnadu Stateboard Standards