下面配置解决:exited with code 134 Visual Studio
launch.json文件可以通过图一小齿轮调出。
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Node",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
笔试中的readline
function tiqu(){
const readline = require('readline-sync');
var str = readline.question("input str");
let allyear=[]
//let str=read_line()
strarray=str.split(' ')
for(argu in strarray){
let firstchar = parseInt(strarray[argu][0])
if(firstchar>=1&&firstchar<=3&&strarray[argu].length==4){
let ele=strarray[argu].split('')
let ayear=true
for(let i=1;i<4;i++){
let charcodeat =ele[i].charCodeAt()
if(charcodeat>=48 && charcodeat<=57){
continue
}else{
ayear=false
break
}
}
if(ayear){
allyear.push(parseInt(strarray[argu]))
}
}
}
allyear=allyear.join(' ')
console.log(allyear)
}
tiqu()
|