It is necessary in the operator to compare whether the text contains the value "100" in the answer should be god = 10
function myFunctiontest566() {
var god = 16;
var test = "test 100 pups"
if(test == "*100") {var god = 10;}
}
It is necessary in the operator to compare whether the text contains the value "100" in the answer should be god = 10
function myFunctiontest566() {
var god = 16;
var test = "test 100 pups"
if(test == "*100") {var god = 10;}
}
You could take String#endsWith
and the value 100
for a check.
function myFunctiontest566() {
var god = 16,
test = "test 100";
if (test.endsWith("100")) {
god = 10;
}
console.log(god);
}
myFunctiontest566();