Skip to content

Commit 5645260

Browse files
committed
Echoes input value to output
1 parent 6a7b582 commit 5645260

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pseudocode.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,18 @@ <h2 align="center">Pseudocode to JavaScript Compiler</h2>
4848
}
4949
function readline() {
5050
let input = document.getElementById("input").elements["user_input"].value;
51+
var input_read = "";
5152
var more = input.indexOf(',', user_input);
5253
if (more != -1) {
5354
let begin = user_input;
5455
user_input = more + 1;
55-
return input.substring(begin, more);
56+
input_read = input.substring(begin, more);
5657
}
5758
else {
58-
return input.substring(user_input);
59+
input_read = input.substring(user_input);
5960
}
61+
print(input_read);
62+
return input_read;
6063
}
6164
</script>
6265
<div class="window">

0 commit comments

Comments
 (0)