diff --git a/archive/j/javascript/reverse-string.js b/archive/j/javascript/reverse-string.js index 88c606a82..9ae75637f 100644 --- a/archive/j/javascript/reverse-string.js +++ b/archive/j/javascript/reverse-string.js @@ -1,15 +1,3 @@ -const readline = require('readline'); - const reverse = s => s.split('').reverse().join(''); -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout -}); - -const question = 'Enter a String: '; - -rl.question(question, (answer) => { - console.log(reverse(answer)); - rl.close(); -}); +console.log(reverse(process.argv[2])); diff --git a/archive/j/javascript/testinfo.yml b/archive/j/javascript/testinfo.yml new file mode 100644 index 000000000..fbcfd25c8 --- /dev/null +++ b/archive/j/javascript/testinfo.yml @@ -0,0 +1,8 @@ +folder: + extension: ".js" + naming: "hyphen" + +container: + image: "node" + tag: "11-slim" + cmd: "node {{ source.name }}{{ source.extension }}"