typescript string properties and methods project will teach you about the methods in the typescript playground which will make string handling easier.Since text data is commonly used as a “string” in Typescript, the ability to use and manipulate strings is a core component of Typescript programming. So in this guided project you are going to learn different string properties and methods which are important for string manipulation operations.
What you’ll learn in this course
- Declare and Initialise string variables in Typescript
- Write code using Typescript String Properties in Typescript playground.
- Write code using Typescript String Methods in Typescript playground.
Course Objectives For Typescript String Properties And Methods
In this course, we are going to focus on the following three learning objectives:
- Declare and Initialise string variable in Typescript
- Use different string properties and methods of Typescript.
- Write Typescript code related to String properties and methods in Typescript playground.
By the end of this course, you will be able to learn and understand in detail the important properties and methods of strings in Typescript Programming Language.
Check The Video To Solve The Quiz Easily
Which of the following string properties will return the length of the String in Typescript.
- stringName.length
- stringName.count()
- length.stringName()
- None of the above
Which of the following string methods will return the character at the specified index in TypeScript.
- stringName.charAt(index)
- stringName.indexAt(char)
- stringName.chatAt()
- None of the above
proprofs typescript quiz | typescript free online courses with certificate
Also See: Web Development With jQuery, Ajax and JSON Certification Answers
Output of the following TypeScript Code when you apply str.toUpperCase() method.
- var str : string = “Hello”;
- console.log(str)
- Hello
- HELLO
- hello
- HeLlo
Also See: SEO Specialist Certification The Digital ADDA
Output of the following Typescript Code when you apply str.toLowerCase() method.
- var str : string = “HeLIo”;
- console.log(str)
Chose The correct one
- Hello
- HELLO
- hello
- HeLIo
Which of the string methods is used to combine the text of two strings and returns a new string in TypeScript.
- concat()
- index()
- charAt()
- All of the above
Which of the following string methods is used to remove the white spaces from the string.
- split()
- trim()
- repalce()
- concat()
Which string method replaces the matched substring with a new substring.
- replace()
- split()
- charAt()
- None of the Above
Also See: HTML, CSS, and Javascript for Web Developers Certification
In Typescript, String is nothing but ________________
- Sequence of characters
- Sequence of Numbers
- Sequence of Characters and Numbers
- None of the above