What is substring()'s equivalence in p5js?

Hi everyone,

How can I achieve the following pseudo code in p5js to create substring, as I couldn't find anything function which has similar effect of substring() in Processing3?

    function setup() {
        var str = "0930";
        str.substring(0, 2);
    }
Tagged:
Sign In or Register to comment.