ECMA 6 is upcoming new version of javascript, It has a huge amount of changes on the top of previous version ECMA 5 .There are various major changes like adding new types or syntax, To sustain in future one must gain basic knowledge of upcoming version of JavaScript. Lets start with some new upcoming string functions
String functions
- includes() - it return boolean value, returns true if the inputted text is present any where in the whole string, else return false.
- startsWith() - It is just like includes but instead of searching whole string, it only matches whether the inputted text matches with the initial characters of the given string.
- endsWith() - Same as above except it matches the text in the string at the end instead with the starting.
var msg = "Oodles Technologies";
console.log(msg.startsWith("Oodles")); // true
console.log(msg.endsWith("!")); // false
console.log(msg.includes("s T")); // true
- repeat() - this function takes one argument which determine how many it has to repeat the string.
console.log("test".repeat(3)); // "testtesttest"
THANKS
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Pawanpreet Singh
Pawanpreet is an seasoned Project Manager with a wealth of knowledge in software development, specializing in frontend and mobile applications. He possesses a strong command of project management tools, including Jira, Trello, and others. With a proven track record, he has successfully overseen the delivery of multiple software development projects, managing budgets and large teams. Notable projects he has contributed to include TimeForge, Yogyata, Kairos, Veto, Inspirien App, and more. Pawanpreet excels in developing and maintaining project plans, schedules, and budgets, ensuring timely delivery while staying within allocated resources. He collaborates closely with clients to define project scope and requirements, establish timelines and milestones, and effectively manage expectations. Regular project status meetings are conducted by him, providing clients and stakeholders with consistent updates on project progress, risks, and issues. Additionally, he coaches and mentors project leads, offering guidance on project management best practices and supporting their professional development.