JavaScript Chapter 4 - Practice Set on Strings | JavaScript Tutorial in Hindi #15

preview_player
Показать описание
Let's solve some practice questions around Strings.

python, C, C++, Java, JavaScript and Other Cheetsheets [++]:

►Learn in One Video[++]:

►Complete course [playlist]:

Follow Me On Social Media
Comment "#HarryBhai" if you read this 😉😉
Рекомендации по теме
Комментарии
Автор

On your request, I have revamped the channel membership and added more levels.

CodeWithHarry
Автор

Bro Now I have got a job in Wipro.... Remembering those college days when You were one and only teacher for Now as my job field is in network.... Missing your videos thanks for those days but recently I am thinking of learning DevOps & Automation.. So if you come with such a video on this topic... It will be too much helpful....

shubhammahajan
Автор

harry sir you CAN change the 4th character in in string by replace method, ofcourse it will not change the actual string but you can display the change in string and also you can make the copy of it by the replace method

surajthakur
Автор

In the first question, '4' will be printed !
Great tutor! Thank you harry! You rock always! 🤘

learner
Автор

Commenting here just to encourage you to never stop adding value in people's lives. You are amazing as always !

rutujagaikwad
Автор

GYM JAYA KARO HARIS BHAI, AAPKI HEALTH HUMARA LIYE BHOUT ZAROORI HA !!!

faziel.sheikh
Автор

Hi for last question I changed string to array and it worked because arrays are mutable -
const arr = [...str]
for(let i = 0 ; i < arr.length ; i++){
if(i === 4){
arr[i]='o'

console.log(arr[i])
}

}
console.log(arr)

shubhibhatnagar
Автор

Harry Bhai, i would say at first when i started to learn the basics of web development from your channel, i often found out that you frequently say that you guys could do this on your own and as i was a beginner, things started to distract me from my path, i left learning and thought that there is not even a single person on youtube who wants the beginners of my age to learn how to code and everyone is just running for views and subscribers, but since i have accessed your current JS playlist, i would say that you are teaching with much more honesty than you did before. Keep up the good work. Always remember that there are people who don't say a lot but keep watching you and they feel themselves inferior in terms of their mental capability and they are afraid of writing comments, so to avoid humiliation and mockery from your young students, so when you teach, please make sure that you keep the slowest guys in mind. Hope you understand.
Regards,
Taimoor Khan, Punjab, Pakistan

quixote
Автор

Problem 1 - Answer - 4 because escape sequence chatracter is not included as string
Problem 3 -
let string1 = "Hi, This is Siddhant"

siddhantkumar
Автор

Tips: You can use this code to convert input data into number in single line
let sam = Number.parseInt(prompt("Enter here:"));

samirop
Автор

पूरे youtube me aap supr ho jo bhut hi बारीकी से lekr हाई level tk सिखाते ho🎉

sumanlavish
Автор

We all love you, sir. You are literally adding more value than our most of the colleges do.

anuj
Автор

We are living in Golden learning time of coding because Harry bhaiya is here❤

jyotishwarrajshukla
Автор

ans of q 1 is 4 as backslash is an escape character and not counted. Also sir I muct say that u are a gr8 teach and thank u much

SaiasmiGupta
Автор

Problem 1 : answer is 4.
Reason: Escape sequence characters are counted as single character.

kalpu
Автор

// Q.5 - Change a particular letter of a string
let actor = "LeoDeCaprio"

// method1 - incorrect
actor[3] = "L"
console.log(actor)

//method2 - correct
console.log(actor.replace("De", "Le"))

ShoaibAhmed-obfq
Автор

Harry sir, I have a solution for 5th question;
5)Try to change 4th character of a given string were you able to do it?
let d="Kavin"
console.log(d.replace "n", "f")

Ithinktoons
Автор

Sir, we also can slice the number like this

str = "Please give rs 1000"
matches = str.match(/(\d+)/)
if(matches){
var amount = (str.slice(matches.index))
}
console.log(amount)
console.log(typeof amount)

shaktiswarupmishra
Автор

Sir aapne last question me kaha ki string change nahi ho sakti but
We use..
let str="harry"
Console.log(str.replace("r", "i"))
O/p : hariy

Yug.
Автор

In the first question the code will print 4
wese yaar aap to humay bohat acchey tarika se parha rahe ho❤❤
Thank you and love you from Pakistan

umairraza