You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1033,6 +1033,27 @@ Code implementation is much strait forward. You just need to compare both the st
1033
1033
// should return "12"
1034
1034
```
1035
1035
1036
+
*2.Compare positions:*
1037
+
<br>
1038
+
1039
+
* Check whether the position of characters in the 2 given strings are same.
1040
+
* Convert the 2 strings into array of their character, for doing this we can use "split()" method. <br>
1041
+
* The *.split()* method is used to split a string into an array of characters. It receives one argument which specifies the separator that determines where every split occurs.
1042
+
1043
+
* Using for loop we're gonna check every character of one string with the corresponding character of another string. <br>
1044
+
* Have a look at the snippet below, you will get an idea.
0 commit comments