0% found this document useful (0 votes)
10 views1 page

Generating Report

The document contains a JavaScript function that generates a report from an array of student data. It calculates the number of rows and columns, and retrieves the column names. The report is then logged to the console.

Uploaded by

rojamani ganta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Generating Report

The document contains a JavaScript function that generates a report from an array of student data. It calculates the number of rows and columns, and retrieves the column names. The report is then logged to the console.

Uploaded by

rojamani ganta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

//generating report from the given data

const data = [{"sno" : "1",


"sname" : "lakshmi",
"mobile": "12345",
},
{"sno" : "2",
"sname" : "sarala",
"mobile": "45678",
},
{"sno" : "3",
"sname" : "ram",
"mobile": "23678",
},
];
function generateReport (data) {
const columns = [Link](data[0]); {
return {
numRows: [Link],
numColumns: [Link],
columnNames: columns,
};
};
};
const report = generateReport(data);
[Link]("Number of rows: " + [Link]);
[Link]("Number of columns: " + [Link]);
[Link]("Columns: " + [Link](", "));

You might also like