Javascript Remove First Element from Array?

you want to remove first element from an array without any loop. you can first element value from array without loop.I am explaining you, how to remove first value from an array. let’s see example :

<!DOCTYPE html>
<html>
<head>
   <title>Javascript Remove First Element from Array? </title>
</head>
<body>  
<script type="text/javascript">
   
    var results = [ "pakizacity.com","markdevelopments.com","webdeveloperindia.in"];
  
    results.shift();
  
    console.log(results);

  
</script>  
</body>
</html>

Result:

['markdevelopments.com','webdeveloperindia.in']

One thought to “Javascript Remove First Element from Array?”

Leave a Reply

Your email address will not be published. Required fields are marked *

17 − 8 =