function string js code example Example 1: js string String(thing) Example 2: js string return 'cat'[1]; // returns "a"