Home
Categories
Labels
Photoshop
About
Photoshop
Photoshop
Shortcut
Keys
Flash
None
None
None
None
None
None
CorelDraw
About
CorelDraw
None
None
None
None
None
None
None
None
None
HTML/CSS
Gallery
Downloads
Multimedia
Graphics
JavaScript
Array
Sort
Method
January 05, 2018
By Jahangir Shah
HTML
,
JavaScript
0 comments
<HTML> <HEAD> <TITLE>Sort Ten Words</TITLE> <SCRIPT> words = new Array ( 10 ) ; for ( k = 0 ; k < words.length ; k = k + 1 ) { words[ k ] = window.prompt( "Enter word # " + k, "" ) ; } document.write( "UNSORTED WORDS:" + "<BR>" ) ; for ( k = 0 ; k < words.length ; k = k + 1 ) { document.write( words[ k ] + "<BR>" ) ; } words.sort( ) ; document.write( "SORTED WORDS:" + "<br>" ) ; for ( k = 0 ; k < words.length ; k = k + 1 ) { document.write( words[ k ] + "<BR>" ) ; } </SCRIPT> </HEAD> <body> </BODY> </HTML>
0
comments:
Older Post
Home
Subscribe to:
Post Comments (Atom)
Search
Categories
Animation
(1)
Graphics
(4)
HTML
(3)
JavaScript
(1)
Multimedia
(1)
Photoshop
(3)
Popular
Posts
Photoshop
Shortcut
Keys
What
is
Multimedia
?
Marquee
in
Html
What
is
Macromedia
Flash
?