how to find size of string in javascriipt code example Example: string size javascript var str = "Hello World!"; var n = str.length; // n == 12