String javscript code example Example 1: js string return 'cat'.charAt(1); // returns "a" Example 2: JavaScript Strings var x = "SAMER";