I am new in Javascript. I try to open 10 new tabs with the same link but when I run the code and click on the button it opens only one tab with this url. Please tell me how to do that in js.
Here is the code:
<button
onclick="virus()"
type="button"
name="button"
>Start your Magic!</button>
<script>
function virus() {
for(var i = 0; i < 10; i++) {
window.open("https://www.w3schools.com/js/js_jquery_selectors.asp");
}
}
</script>