You are on page 1of 8

REVISION-WEB APPLICATION Class 12

REVISION

Give the output


Month31=["MAR","JUL","OCT"]
Month30=["APR","JUN","NOV"]

document.write(Month31.push("DEC")) 4
document.write(Month31.unshift("JAN")) 5
document.write(Month30.pop()) NOV
document.write(Month30.shift()) APR
document.write(Month31.splice(1,0,"FEB")) It will show nothing as splice return deleted
element but change the original array
document.write(Month31.slice(2,5)) MAR,JUL,OCT

document.write(Month30.concat(Month31)) JUN,JAN,FEB,MAR,JUL,OCT,DEC

document.write(Month31.sort()) DEC,FEB,JAN,JUL,MAR,OCT

document.write(Month31.reverse()) OCT,MAR,JUL,JAN,FEB,DEC

document.write(Month31.length) 6
STR= "FAIPS-KUWAIT-2019"
document.write(STR.toUpperCase()) FAIPS-KUWAIT-2019

document.write(STR.slice(2,6)) IPS-

document.write(STR.substr(2,6)) IPS-KU

document.write(STR.substring(2,6)) IPS-

document.write(STR.charAt(2)) I

document.write(STR.indexOf('P')) 3

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 1


REVISION-WEB APPLICATION Class 12

Give difference between the following


substr() substring()
The substr() method extracts parts of a string, The substring() method extracts parts of a string,
beginning at the character at the specified position, beginning at the character at the specified index
and returns the specified number of characters. position till end-1 index position and returns the
specified number of characters.
The substr() method does not change the original The substring() method does not change the
string. original string.
var str = "FAIPS KUWAIT"; var str = "faips kuwait";
var str = str.substr(6,6) var str = str.substring(6,11)
document.write(str) //output KUWAIT document.write(str) //output KUWAI
shift() unshift()
shift() method removes the first element from array The unshift() method adds new items to the
and return it beginning of an array, and returns the new length.
This method changes the original array. This method changes the original array.
The return value of the shift method is the removed The return value of the unshift method is the new
item. length of any array
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.shift()+"<br>") //output document.write(fruits.unshift("Grapes")+"<br>") //
Banana output 5
document.write(fruits)// output document.write(fruits) // output
Orange,Apple,Mango Grapes,Banana,Orange,Apple,Mango

push() pop()

Push method is used to add one or more items to pop() method removes the last element from array
the end. and return it
This method changes the original array. This method changes the original array
The return value of the push method is the new length The return value of the pop method is the removed
of any array item.
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.push("Grapes")+"<br>") // document.write(fruits.pop()+"<br>")
output 5 //output Banana
document.write(fruits)//output document.write(fruits)// output
Grapes,Banana,Orange,Apple,Mango Orange,Apple,Mango

slice() splice()

slice() method is used to extract values from array The splice() method adds/removes items to/from
from start index position to end-1 index position an array, and returns the removed item(s).
This method does not changes the original array. This method changes the original array.
arr1=[2,4,6,8,10,12,14,16] var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(arr1.slice(4,7)) )) // output 10,12,14 fruits.splice(2, 1, "Lemon", "Kiwi");
document.write(arr1.slice(-6,4)) // output 6,8 document.write(fruits)//output
document.write(arr1.slice(-6,-4)) )) // output 6,8 Banana,Orange,Lemon,Kiwi,Mango
document.write(arr1.slice(2,-3)) )) // output 6,8,10
If only start is given than all elements from start
index till end will be extracted
If negative index is given in start then from right hand
side indexing will be done last element will be -1
index

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 2


REVISION-WEB APPLICATION Class 12

join() concat()

join() method is used to combine the elements of concat method is used to combine two or more
array into string using separator arrays or values
arr1=["Sun","Mon","Tue"] arr1=["Sun","Mon","Tue"]
document.write(arr1.join(‘@’)) //output arr2=["Wed","Thu","Fri"]
Sun@Mon@Tue arr3=arr1.concat(arr2)
document.write(arr3) // output
Sun,Mon,Tue,Wed,Thu,Fri
arr3=arr2.concat(arr1, “Sat”) //output
Wed,Thu,Fri,Sun,Mon,Tue,Sat
charAt() indexOf()

The charAt() method returns the character at the The indexOf() method returns the position of the
specified index in a string. first occurrence of a specified value in a string.
The index of the first character is 0, the second This method returns -1 if the value to search for
character is 1, and so on. never found. The indexOf() method is case
sensitive.

str1=”FAIPS-Kuwait” Str1=”Web Application”


document.write(str1.charAt(4)) document.write(Str1.indexOf(“App”)) // output 4
output S document.write(Str1.indexOf(‘B’)) output -1 (case
sensitive)
sort() reverse()

Sort method is used to sort array string element in The reverse() method reverses the order of the
ascending order elements in an array. This method changes the
original array.
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits +"<br>") document.write(fruits.reverse()+"<br>")
document.write(fruits.sort()+"<br>") document.write(fruits)
output output
Banana,Orange,Apple,Mango Mango,Apple,Orange,Banana
Apple,Banana,Mango,Orange Mango,Apple,Orange,Banana
Actual parameter Formal Parameter
Parameter used during function calling are called Parameter used in function header are called formal
actual parameter parameter
Actual Parameter can be variable, constant, or Formal parameter can be only variable
expression
Example:
<script>
function add(a, b) //a and b are formal parameters
{
sum = a+b;
document.write("Sum = "+sum);
}
x = 10, y = 20;

add(40,20); //40 and 20 are actual parameters


add(m,n); //x and y are actual parameters
add(x+2,y+5); //x+2 and y+5 are actual parameters
</script>

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 3


REVISION-WEB APPLICATION Class 12

Local Variable Global Variable

Variable declare inside function or block using var Variable is declared outside any function or block are
keyword are called local variable. called global variable.
Variable declare inside function or block without Variable declare inside function without var keyword
using var keyword is not local variable also has global scope
Local variable can be used only within the function Global variable can be used anywhere in script .
in which they are declared not outside
function add(x,y) // formal parameters are always local variable
{
z=x+y // z declare without var keyword will be treated as global variable
}
add(10,8) // function call will execute add function and calculate z =10+8
document.write(z) // output will be 18 as z has global scope can be used outside function

Story Board Timeline


Audio cannot be added in story board view Audio can be added in Time line View
Trimming of clip cannot be done Trimming can be done
Time span of clip cannot be edited Time span of clip can be edited
Title overlay cannot be done Title overlay can be done
Trim a Clip Split a Clip
Hiding certain part from beginning or end of clip Splitting or breaking bigger clip to two part
It can be done on timeline view only I can be done on both timeline or storyboard
Entry Level Loop Exit Level Loop
Loops in which condition is checked in the Loop in which condition is checked in the end
beginning of loop
It will not run if condition is false in the beginning or It will run at least once even if the condition is false
on first run on first run
for loop , while loop do while loop
Unary operator Binary Operator
Operator which required one operand are known as Operators which required two operands are known
Unary operators as Binary operators
+ , - , ++, -- ,! +,-*,/,%,>, <, etc
== ===
Checks for equality comparison for values ignoring Checks for equality comparison for values without
datatype ignoring datatype
2== “2” TRUE 2=== “2” FALSE 2 is integer “2” is string different
0==false TRUE datatype
0===false FALSE
Give 3 examples of logical operator && , ||, !

Give 3 examples of relational operator >,<,==,===,!=,<=,>=


Give 3 examples of unary operator +,-,++,--,!
Give 3 examples of binary operator +,-,*,/,%

Give 3 examples of Videos File supported by wmv,mpeg, avi


windows Movie Maker 2.6
Give 3 examples of audio File supported by wav,mp2,mp3
windows Movie Maker 2.6

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 4


REVISION-WEB APPLICATION Class 12

Give 3 examples of Picture File supported by Jpeg,png,gif,bmp


windows Movie Maker 2.6
Give 3 examples of Transition Style supported by Fade in fade ,horizontal bars, circle, checkerbox, flip
windows Movie Maker 2.6 in etc
Give 3 examples of Videos effects supported by Ease in, ease out, fade in, fade out, Film Age, Zoom
windows Movie Maker 2.6 in Zoom out
Name three object supported by JavaScript String,Date,Math,Array

4 Primitive Datatype of JavaScript Number,String,Boolean,NULL, Undefined

Explain the following


default default is used inside switch case , it is optional in switch case
if none of the case match with test expression default case will be evaluated if given

break break is used to exit the block or loop immediately without executing further code of
that block or loop. Control moves out of loop or block

continue continue is used to move to next iteration of loop with executing current iteration given
after continue

Conditional Conditional operator is also known as ternary operator as it required three operand
operator and two operator ? :
Syntax (condition) ? code if condition is true : code if condition is false
Example
(Age>18)? document.write(“You Can Vote”) : document.write(“You cannot Vote”)

prompt() prompt() method is used to ask user to input value from user in a dialogue box. Value
enter in prompt can be stored in variable when user click on Ok button
Name =prompt(“Enter your Name “)

alert()
alert () method is used to display message or value in a dialogue box.
Name =prompt(“Enter your Name “)
alert(“Your Name is=”+Name)
it has one button Ok when user click on OK button alert dialogue box close

confirm() Confirm method is used to ask you’re a question to confirm something .it has two
button ok and cancel
if user click on Ok button 1 is return and if click on cancel button 0 is return

math.abs() Math.abs is used to give absolute value which is always positive


Maths.abs(-40) // output 40

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 5


REVISION-WEB APPLICATION Class 12

Write steps or procedure to do the following in reference to Windows Movie Maker


1. To Save or Publish movie in DVD
 Insert a blank or rewritable DVD into the DVD burner.
 In Windows Movie Maker, click File  ‘Publish Movie’
 Click ‘DVD’, and then click Next. Windows DVD Maker opens.
 Complete the steps to create a DVD using Windows DVD Maker.
2. To Save or Publish movie in CD
 Insert a blank or rewritable CD into the CD burner.
 In Windows Movie Maker, click File  ‘Publish Movie’
 Click ‘Recordable CD’, and then click Next.
 In the ‘File name’ box, type a name for your movie.
 In the ‘CD name’ box, enter the name for the CD, and then click Next.
 Choose the settings to be used to publish the movie, and then click Publish
3. To Save or Publish Movie to Computer
 Click File  ‘Publish Movie’
 Click ‘This computer’, and then click Next
 In the File name box, enter a name for your movie.
 In the ‘Publish To’ box, choose wherever you want to save the movie and click Next.
 Choose the settings to be used to publish the movie, and then click Publish.
 To watch the movie after it has been published, select the ‘Play movie after I click Finish’ check box.
4. To add transition in Movie
 Click on transition link on Task Pane
 Different transition will appear on Content Pane
 Select the transition you want to put between clips
 Drag the selected transition from content pane to small box between two clips on story board view

5. To add Video Effect in Movie


 Click on Effects link on Task Pane
 Different Video effects will appear on Content Pane
 Select the Effects you want to put on clips
 Drag the selected Effects from content pane to clips on story board view
6. To split a Clip
 In the content pane or on the storyboard/timeline, click the clip that need to be split.
 Under the preview monitor, click the Play button.
 When the clip reaches the point where you want to split the clip, click Pause.
 Under the preview monitor, click the Split button.
7. To combine two clips
 In the contents pane or on the storyboard, hold down the CTRL key, and then click the
contiguous clips that need to be combined.
 Click Clip, and then Combine or Press N Key form keyboard to combine
8. To trim a Clip
(i) In the Timeline view, click the clip to be trimmed.
(ii) Use the playback controls under the preview monitor to find the point where you want to trim the clip.
(iii) Do the following:
 When the playback indicator is at the point where you want the selected clip to start playback,
click ClipTrim Beginning
 When the playback indicator is at the point where you want the selected clip to stop playback,
click ClipTrim End

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 6


REVISION-WEB APPLICATION Class 12

9. To add Title in the Beginning and Credit in end and increase the time span
 Click Tools”Titles and Credits”
 Click the link that corresponds to the location where title or credit is to be inserted select at beginning.
 In the “Enter text for title” box, type the title or credit.
 Click ‘Add title’ button.
 To change the animation click ‘Change the animation’ and select the desired animation from the list.
 To change the font or color of the title/credit, click the ‘Change the text font and color’, and select the
desired font face, color, background color, formatting, etc.

Steps to change the duration of a title:


(i) While on timeline, select the title whose duration needs to be changed.
(ii) Do the following:
 To extend the playback duration of the title, drag the end trim handle towards the end of the timeline.
 To reduce the playback duration of the title, drag the end trim handle towards the beginning of the
timeline.
10. To add Title overlay on movie clip
 Click Tools”Titles and Credits”
 Click on Title on selected clip
 In the “Enter text for title” box, type the title
 Click ‘Add title’ button.
 To change the animation click ‘Change the animation’ and select the desired animation from the list.
o To change the font or color of the title/credit, click the ‘Change the text font and color’, and
select the desired font face, color, background color, formatting, etc
11. To Adjust the Audio timing in Movie

 Select the Audio you want to edit or change timing on Timeline view
 Use the drag handle from end to trim by moving inward or to increase the time, move the drag
handle outward or forwad

12. Explain the following

Task Pane
The Movie Tasks Pane provides an outline of the video editing process in Windows Movie Maker. Each
of the three steps listed in the Movie Tasks Pane
1 Capture Video – it contain option to import audio, video and pictures to your collection
2. Edit Movie- it has option to add transitions, video effects, and title and credit for movie
editing
3. Finish Movie- option to save and publish your movie at different place like computer ,DVD,CD,
Emails etc

Each includes links for the tasks you would perform for that step. When you click on any
of inks, Windows Movie Maker will start a wizard that will guide you through the task
Preview Monitor
The preview monitor enables us to view individual clips or an entire project. By using the preview
monitor, we can preview our project before publishing it as a movie. We can use the buttons
underneath the preview monitor to play or pause a clip, or to advance or rewind a clip frame-by-
frame.
The Split button allows us to split a clip into two parts at the point displayed in the
preview monitor.

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 7


REVISION-WEB APPLICATION Class 12

Content pane
The Contents pane displays the clips that are contained in the collection that is selected in the
Collections pane. The Contents pane displays all of the video, audio, pictures, video transitions, and
video effects that can be added to the storyboard/timeline to include in your movie.
Contents pane has two views:
Two views of content pane Details and Thumbnails.
In Thumbnails view content are shown as image
In Details view content are shown as list with information like filename, type, duration, size etc.
Collection Pane
The Collections Pane displays our collection folders, which contain clips. The collection
folders appear in the Collections pane on the left, and the clips in the selected collection
folder are displayed in the Contents pane on the right.

Story Board
Storyboard. The storyboard is the default view in Windows Movie Maker. We can
use the storyboard to look at the sequence or ordering of the clips in your project and
easily rearrange them, if necessary. This view also let us see any video effects or
video transitions that have been added. Audio clips that have added to a project are
not displayed on the storyboard, but we can see them in the timeline view. The following
picture shows the storyboard view in Windows Movie Maker

Time Line
Timeline: The timeline view provides a more detailed view of our movie project and allows
us to make finer edits. Using this timeline view, we can:-
1) Trim video clips,
2) adjust the duration of transitions
between clips,
3) view the audio track.
4) Review or modify the timing of clips.
5) Adding title overlay

vinodsrivastava.com vinsri76@yahoo.com +965-69300304 Page 8

You might also like