Given Statement: wElComE tO tyPeScrIpT
Required Output: Welcome to typescript
Program:
let msg: string = 'wElComE tO tyPeScrIpT';
let firstchar: string =msg.charAt(0);
let restchar: string = msg.substring(1);
let newmsg: string = firstchar.toUppercase() + restchar.toLowercase();
console.log(msg);
console.log(newmsg);
Posted By: pankaj_bhakre
Required Output: Welcome to typescript
Program:
let msg: string = 'wElComE tO tyPeScrIpT';
let firstchar: string =msg.charAt(0);
let restchar: string = msg.substring(1);
let newmsg: string = firstchar.toUppercase() + restchar.toLowercase();
console.log(msg);
console.log(newmsg);
Posted By: pankaj_bhakre
No comments:
Post a Comment