can't figure out the problem in my program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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>

22nd Jun 2019, 10:38 AM
Adem Rguez
Adem Rguez - avatar
1 Answer
+ 1
What is the expected output 😐
1st Jul 2019, 6:54 AM
Kelvin Paul
Kelvin Paul - avatar