var str = name.toUpperCase();
var ch = new Array();
ch = str.split('');
for(var i=0;i<7;i++)
{
if(ch = null) {
result_code.replace(
pos.toString()+pos.toString()+pos.toString()+pos.toString(),
"FFFF");
} else {
var temp = parseInt(ch[i]);
var temp_integer = 64;
if(temp<=122 & temp>=97) {
var pos = i+1;
result_code.replace(
pos.toString()+pos.toString()+pos.toString()+pos.toString(),
(temp - temp_integer)+40);
}
}
}
This code is creating the error at this line result_code.replace(pos.toString()+pos.toString()+pos.toString()+pos.toString(), (temp - temp_integer)+40);
.
The underlined information is this section (temp - temp_integer)+40
.
The error shown is Argument type Number is not assignable to parameter type String|Function
.
What is wrong with this code? I am using WebStorm. I am likely just making a dumb mistake. Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…