|
@@ -111,6 +111,7 @@ module.exports = class Computer {
|
|
|
* Execute the OUTPUT opcode
|
|
|
*
|
|
|
* @param {number} outputPosition The memory address of the value to output
|
|
|
+ * @returns {void}
|
|
|
*/
|
|
|
Operation_Output(outputPosition) {
|
|
|
console.log(this.stack.Get(outputPosition));
|
|
@@ -142,5 +143,5 @@ module.exports = class Computer {
|
|
|
* @returns {boolean} Whether the value in that number's place is non-zero
|
|
|
*/
|
|
|
function DecimalPlaceIsNonZero(input, place) {
|
|
|
- return !!Math.floor((input % 10**place) / 10**(place - 1));
|
|
|
-}
|
|
|
+ return !!Math.floor((input % (10 ** place)) / (10 ** (place - 1)));
|
|
|
+}
|