string.startswith code example Example: js startswith var str = "Hello world, welcome to the universe."; var n = str.startsWith("Hello");