string sub code example
Example 1: substring
const str = 'Mozilla';
console.log(str.substring(1, 3));
// expected output: "oz"
console.log(str.substring(2));
// expected output: "zilla"
Example 2: Lua string
-- Strings are immutable. Immutable simply means unmodifiable or unchangeable.
a = 'this is a string'