delete operator to remove the array value

     If you delete the array value using delete operator, the index value not removed but the value is removed.

Syntax

     delete expression;
Example

       var ar=["red","green","Apricot","Guava"];

       delete ar[1];


Example Program:- (Editor)


Editor is Loading...

Advertisement

Nhận xét

Bài đăng phổ biến từ blog này

How to set the SDK, NDK and JDK path to android studio?

if statement

Select all values from list box in a single click using javascript