check if a string begins with particular string js

Solutions on MaxInterview for check if a string begins with particular string js by the best coders in the world

showing results for - "check if a string begins with particular string js"
Francesco
28 May 2019
1var str = "Hello world, welcome to the universe.";
2var n = str.startsWith("Hello"); // true
3// Returns true or false