Switch to full style
JavaScript code examples
Post a reply

Array size to zero

Sat Sep 17, 2011 11:56 pm

Delete content of of array .
Code:
<html>
<
title>Clear Array</title>
<
head>
<
script language="JavaScript">
<!--

function clearArray()
{
 var colorArr= ["RED", "BLUE", "YELLOW"];

 
// clear the array.
colorArr.length = 0;
}
 

//-->
</script>
</head>

<body>

 
<SCRIPT language="JavaScript">
<!--
clearArray();
//-->
</SCRIPT>

</body>
</HTML>




Post a reply
  Related Posts  to : Array size to zero
 How to write C++ code that defines array of size 24 then;     -  
 Set image size as a percentage of the page size     -  
 Array difference for associate array     -  
 Nav button size     -  
 What is the size of this Structure     -  
 get string size in c++     -  
 get Folder path and size     -  
 set the size of border in pixels     -  
 preferred size of a component     -  
 how to find size without using sizeof     -  

Topic Tags

JavaScript Arrays