How to write an HTML code for this javascript  result/output? where the result will be displayed in HTML page.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 12VE
icon
Related questions
Question

test_var = 'AAMMTTMT';//test_var is testing variable taken
array = test_var.split('');//string is split into the array

function SWAP(TAM, i, j)//function to swap
{
temp = TAM[i];
TAM[i] = TAM[j];
TAM[j] = temp;
}
function sort_AMT(TAMUK)//function to sort the array
{
for(i = 0; i<TAMUK.length;i++)
{
for(j = 0; j<TAMUK.length-1;j++)
{
if(TAMUK[i]<TAMUK[j])
SWAP(TAMUK,i,j);
}
}
console.log(TAMUK);
}

sort_AMT(array);//function call

 

How to write an HTML code for this javascript  result/output?

where the result will be displayed in HTML page.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Events
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning