this is what i mean:

{input\_value: hello,world}

func delete (target, wordstodelete): // delete wordstodelete from target

{new\_input\_value = delete ",world" from input\_value}

so this is my file code:

```
<input id=“extension” type="file”>
<script>
Let e = document.getelementbyid(“extension”).value;
if(e.includes(“.atkp”)) {

}else{
alert(“this file can’t be accessed since it doesn’t have the extention ‘.atpk’.”)
}
</script>

```

i asked google and many other websites like w3schools. i found nothing useful except the `substr()` but it uses numbers. i want a function something like this: `let e-edited = e.substr(".atkr")`, instead does this `let e-edited = e.substr(1, 3)`.
i have nothing to start with. if i have to use the `substr()` method, then i have to make sure that the length is 10 or 8 characters and a name like: `gghh.atkp` or `exampl.atkp`.