<script> var variable = "abcde"; if(typeof variable === "string"){ alert("La variable es un string"); }else{ alert("La variable no es un string"); } </script>