Buy Questpond's video subscriptions on
huge discount
.
Online: 1811
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
JavaScript
>
Loading ...
How will you sort an array using javascript?
Posted by
Rajni.Shekhar
on 4/12/2012 | Category:
JavaScript Interview questions
| Views: 3696 |
Points: 40
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Using sort() function.
[code]var arr=new Array();
arr[0]="dot";
arr[1]="net";
arr[2]="funda";
arr.sort();
document.write(arr[0] + " " + arr[1] + " " + arr[2] );
output will be
dot funda net
[/code]
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
How to convert a string to float or number in java ...
Next > :
How do you create array in javascript?
Comments or Responses
Login to post response
More Interview Questions by Rajni.Shekhar
How do you create array in javascript?
How will you create new object in javascript?
What is isNaN in javascript?
How to load xml into dataset?
What data type javascript supports?
Struct can be inherited or not?
can we declare private class in namespace?
What is PageMethod in ASP.Net AJAX?
Latest Interview Questions
Which element is the prime element in the config file in which all WCF ...
Defining endpoints programmatically in WCF is a good practice or not ?
How can you define an Endpoint problematically in WCF ?
In WCf, which binding is used if you are using WCF-to-WCF communicatio ...
In WCF, which is/are used for representing content in WebHttpBinding ?
In WCF, which is the right binding for RESTful communication and other ...
In WCF, is SOAP envelope created while using WebHttpBinding ?
How many Nested Queries possible in sql?
More ...