-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.html
More file actions
53 lines (48 loc) · 943 Bytes
/
array.html
File metadata and controls
53 lines (48 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p id="display"></p>
<script>
// let str1 = "rkqdlw";
// let str2 = "world";
// if (str1.includes(str2)!==-1) {
// console.log("true");
// } else {
// console.log("false");
// }
// var s="IV";
// symbols = {
// "I": 1,
// "V": 5,
// "X": 10,
// "L": 50,
// "C": 100,
// "D": 500,
// "M": 1000
// };
// let value =0;
// for(let i = 0; i < s.length; i++){
// if (s[i] === "I" && s[i + 1] === "V") {
// value += 4;
// i++;
// }
// else{
// value +=symbols[s[i]];
// }
// }
// console.log(value);
s="()[]{}"
s= s.split('');
let bracket=[];
for(i=0;i<=s.length-1;i++){
bracket +=s[i]
}
console.log(s)
</script>
</body>
</html>