Thứ Tư, 10 tháng 2, 2016

Read object value using for... in statement in javascript

     for...in is used to read the value from objects, it can read all the objects or array values one by one. In the following example we are discuss how to read the object value using for...in.

Syntax

for(variable in array_or_object)

{



  statements;



}

Example

    for(i in ar_ob)

      {

        alert("Name : "+ar_ob[i].name);

        alert("Mark : "+ar_ob[i].mark);

      }


Example Program:- (Editor)


Editor is Loading...

Advertisement




Tags
Read object value in allinworld99, allinworld99 to read every object value in javascript, object in allinworld99

0 nhận xét:

Đăng nhận xét