<!DOCTYPE html> <html> <head> <title>Array Operations</title> </head> <body> <button onclick="performOperations()">Perform Operations</button> <script> function printPattern(rows) { // Iterate through each row for (let i = 1; i <= rows; i++) { let pattern = ''; // Add numbers based on the row number for (let j = 1; j <= i; j++) { pattern += i + ' '; // pattern += j + ' '; } // Display the pattern for each row console.log(pattern); } } // To print the pattern with 3 rows let A = [12, 87, 34, 56, 34, 24, 56, 24, 65, 22]; function getMax() { let max = A[0]; for (let i = 1; i < A.length; i++) { if (A[i] > max) { max = ...