Answers for "substring(1);"

54

js substring

// the substring method returns a string out of another string

const str = 'Mozilla';

console.log(str.substring(1, 3));
// expected output: "oz"

console.log(str.substring(2));
// expected output: "zilla"
Posted by: Guest on March-17-2020
13

substring

const str = 'Mozilla';

console.log(str.substring(1, 3));
// expected output: "oz"

console.log(str.substring(2));
// expected output: "zilla"
Posted by: Guest on February-06-2020
1

substring

# Python3 program to Remove repeated 
# unordered sublists from list
  
def Remove(lst):
     return ([list(i) for i in {*[tuple(sorted(i)) for i in lst]}])  
       
# Driver code
lst = [[1], [1, 2], [3, 4, 5], [2, 1]]
print(Remove(lst))
Posted by: Guest on May-27-2021
0

str.substring if 2 letters

public String firstTwo(String str) {
    return str.length() < 2 ? str : str.substring(0, 2);
}
Posted by: Guest on September-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language