completed the writeln js