can anyone help me about how to get the output of the Need where Need is equal to Max subtracted to Allocted
Alloc|Max|Need
123| 444|321
123| 444|321
123| 444|321


HTML Code:
<html lang="en">
<head>

<script type = "text/javascript" language = "JavaScript">

           function multidimensionalArray(array) {
                    for(var x=0; x<3; x++) {
                    for(var y=0; y<3; y++){
                    document.write(array[x][y]+" ");
                    }
                    document.write("<br>");
                }
            }
            var Allocated1 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for Allocated 1: ");
            Allocated1[i]=input;
            }

            var  Allocated2 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for Allocated 2: ");
            Allocated2[i]=input;
            }

            var  Allocated3 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for Allocated 3: ");
            Allocated3[i]=input;
            }
            
            var Max1 = new Array();
            for(var m=0;m<3;m++){
            var input=window.prompt("Enter Elements for Max 1: ");
            Max1[m]=input;
            }

            var  Max2 = new Array();
            for(var m=0;m<3;m++){
            var input=window.prompt("Enter Elements for Max 2: ");
            Max2[m]=input;
            }

            var  Max3 = new Array();
            for(var m=0;m<3;m++){
            var input=window.prompt("Enter Elements for Max 3: ");
            Max3[m]=input;
            }
            
            

            
            
            var alloc= new Array(Allocated1,Allocated2,Allocated3);
            multidimensionalArray(alloc);
            var max = new Array(Max1,Max2,Max3);
            multidimensionalArray(max);
            
</script>
</head>
</html>