Dhana Balan

Dhana Balan

  • NA
  • 97
  • 18.7k

How to get the first Data in JavaScript

Jul 22 2020 5:50 AM
Hi ,
 
I have Mulltiple Data's in Javascript Like ("10002938760183,98037801738394,28364920474800,28364920474801,28364920474802") this type of data.
 
I need to  get the first element of 10002938760183 this data.
 
How to get this data in Javascript .
 
Example:
 
var str = "How, are, you, doing, today";
var res = str.split(","); 
 
Output is : How, are, you, doing, today 
 
I need a output on "How" only.
 
Thanks,
Dhanabalan R 

Answers (2)