+ 2
can't figure out the problem in my program
i am relearning javascript and i tried making a simple program but despite that there's no error while compiling still it doesn't work. code: <!doctype> <head> <script> function init_screen(n, m) { var screen =new Array(n); for(i=0;i<=n;i++) { screen[i]= new Array(m); for(j=0;j<=m;j++) screen[i][j]="okokokokokok"; } var sc = document.getElementsByTagName("body"); for(i=0;i<=n;i++) {for(j=0;j<m;j++) sc[0]="(screen[i][j])";} } </script> </head> <body> <button onclick="init_screen(50,20)">ok</button> </body>
1 Respuesta
+ 1
What is the expected output 😐