Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
helloharendra authored Nov 27, 2022
1 parent d73b297 commit 4bdac8e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions assignment7.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var str = prompt("Enter a string");
var flag = false;
for(var i=0; i<str.length; i++){
if(str[i]>='0' && str[i]<='9'){
flag = true;
break;
}
}
if(flag){
alert("String contains digit");
}
else{
alert("String does not contain digit");
}
</script>

</body>
</html>

0 comments on commit 4bdac8e

Please sign in to comment.