I am using Tampermonkey for writing scripts. Before i was using AUTOIT, and there was a function like "If is array then". Is there any option like this in JavaScript?
The main command is
>     setTimeout(function (){
> 
> document.querySelector('[value="Click"]').click();
> 
>     }, 999);
I want to click in that class(and more)
<div class="center" onclick="58246246.submit()" style="cursor: pointer;">
I try something like that but it doesn't work, script is clicking in first value
if ($("center")[0]){
setTimeout(function (){
$1(function(){
document.getElementsByClassName("center")[0].click();
        }, 999);
Can someone help me?
 
     
     
    