Strings: Properties, Methods & Template Literals in JavaScript | JavaScript Tutorial In Hindi #6
HTML-код
- Опубликовано: 11 сен 2024
- I have an updated version of JavaScript course going on. This Ultimate JavaScript course is being supplied with handwritten notes and I highly recommend the latest course over this.
Must watch the updated course here: • JavaScript Tutorials f...
►JavaScript Tutorial For Beginners In Hindi Playlist - • JavaScript Tutorials I...
►Source Code + Other Material - codewithharry....
This video is a part of my JavaScript In Hindi Course. JavaScript is a high-level, interpreted programming language that conforms to the ECMAScript specification. JavaScript has dynamic typing, prototype-based object-orientation, and first-class functions.
Alongside HTML and CSS, JavaScript is one of the best and most demanded technologies of the World Wide Web. JavaScript enables interactive web pages and is a crucial part of web applications. The vast majority of sites use it, and major web browsers have a dedicated JavaScript engine in order to execute it.
As a multi-paradigm language, it supports event-driven, functional, and imperative programming fashion. It has APIs for dealing with text, arrays, regular expressions, and the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities. It relies upon the host machine environment in which it is embedded to provide these features.
►Click here to subscribe - / @codewithharry
Best Hindi Videos For Learning Programming:
►Learn Python In One Video - • Learn Python In Hindi ...
►Learn JavaScript in One Video - • JavaScript Tutorial
►Learn PHP In One Video - • Learn Php In One Video...
►Machine Learning Using Python - • Machine Learning Tutor...
►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
►Advanced Python Tutorials - • Intermediate/Advanced ...
►Object Oriented Programming In Python - • Object Oriented Progra...
►Python Data Science and Big Data Tutorials - • Python Data Science an...
Follow Me On Social Media
►Website (created using Flask) - www.codewithha...
►Facebook - / codewithharry
►Instagram - / codewithharry
►Personal Facebook A/c - / geekyharis
Twitter - / haris_is_here
I have an updated version of JavaScript course going on. This Ultimate JavaScript course is being supplied with handwritten notes and I highly recommend the latest course over this.
Must watch the updated course here: ruclips.net/p/PLu0W_9lII9ahR1blWXxgSlL4y9iQBnLpR
Better than certification courses... and that too for free. Thanx alot Harry sir🙃
First time i see a girl is interested in coding 😅
🔥
@@exploreanything20yearsago95 yes 😅
@Explore Anything• 20 years ago programming language is designed by a lady thats why its too complicated😅😜😜
Very true, thank you sir
concat
length 5:17
tolowercase 5:23
touppercase 6:01
indexof 7:42
lastindexof 9:03
charAt 9:22
endswith 9:53
includes 11
Way better than any paid courses... and that too for free. Thanks Harry !!!!!
God Bless :)
let coder = 'Harry bhai'
let message1 = `You are doing a great job to teach us and inspire us by doing these videos.`
let message2 = 'We are so motivated by your videos and keep going.'
let myhtml = ` Hello ${coder}
${message1}${message2}
`;
document.body.innerHTML = myhtml;
//Template
let str1='JAVASCRIPT';
let str2='JS TUTORIAL';
let sem=` i learn ${str1} from CODE WITH HARRY ${str2} `
document.body.innerHTML=sem;
Bro , Did it run ?
@@rabinarayanbasantia8 mera to nahi ho raha hai
@@soumendramohanty7613 i learn JAVASCRIPT from CODE WITH HARRY JS TUTORIAL dekh mera toh aagay
@@soumendramohanty7613 yaar bhai mere bhi RUN nahi ho rha hai ...
@@educationiq5109 Mera tu hogya
20:24
question done sir....
ans :
let car1 = 'BMW';
let car2 = 'Audi';
let lanHtml = ` I like ${car1} but my favourite car is ${car2}`;
document.body.innerHTML = lanHtml;
Output === " I like BMW but my fvourite car is Audi
Thanks sir great video!!!
you should use it in or
@@bhanu3045 yes @Krish Chaudhary we may use html also in template literels , all the HTML tags in ` `.
@@nirajkumarpatel6173 yea but we'll use only one tag, rather it's p tag or h tag. Right?
@@bhanu3045 no we can use any html tag in side the template literals and design our DOM (website).
@@nirajkumarpatel6173 can u explain me why lanhtml used here...
What is the use of document.body.innerhtml here
// String Template
let para1 ="Good";
let para2 = "Nice";
let sentence = `${para1} Morning
${para2} to meet you!`
console.log(sentence);
// Good Morning
// Nice to meet you!
//Nice
Console.log(para2);
``
Question's ans
Let e1 = 'awesome'
Let theHtml = ` this is my heading
i am ${e1}`;
document.body.innerHtml=theHtml;
Thank you Harry sir for this awesome video
You haven't completed your .... tag.. so for curiosity I copied and tried to run on my vscode..
And it's not working..
I tried to figure out but I failed ..
Plezz recheck your code and tell me what's wrong in it
@@satyamrajchaudhary272 i forgot to mention here typing mistake
Please reply me ye first time Sikh rha muje ye template literals smj nhi aa rha kya aap apni Instagram id send kr skte h please 🙏
Awesome content ... please keep making videos .. Loving your javascript course
Bruh you have both the short-cut methods and the in-depth understanding I wonder how you got all that. Anyways hope you doing fine in this period. Respect +
Harry bhai just finished JavaScript Playlist, each topic very clearly explained . Awesome work bhai . Just a small request can you create playlist on Node.js .
//Template Literal
let name = 'Virat';
let record = 'Centuries';
let record2 = 'runs';
let stats = `${name} will break most ${record} and ${record2} records of sachin`;
document.body.innerHTML = stats;
Nice bro
Your teaching method is so Unique, Clean and Clear Explanation with detailed knowledge... It help Us More in Learning Javascript. Thank you for making this Good Javascript Tutorial Series.
u are very genious person apk tutorial ki vjh sai hum bhut kuch sikh paa rhe hai thanks alot sir
For Future Reference :
Let harry = "This is tutorial six";
harry.length
harry.toLowerCase
harry.toUpperCase
harry.indexOf("ry")
harry.lastIndexOf("r")
harry.charAt(1)
harry.endsWith("ry")
harry.includes("arr")
harry.substring(0,3)
harry.slice(0,4)
harry.split(" ")
harry.replace("h", "m")
15:55 - template literals
Thank-you 👍
harry bhai yaar maza aa gaya literally i went through dozens of js courses none of which suited my learning style but finally i found your course and it made my life alot easier thanks alot bhai : )
let code1= "javaScript tut";
let code2= "code with harry";
let ihtml= ` You are awesome teacher
I Really Enjoy ${code1} with "${code2}" `;
document.body.innerhtml =ihtml;
console.log(ihtml);
You are great human, sir.
Who was your teacher? Curious to know how you received such in-depth knowledge.🤔
Ayee hayee rashmi ji
me
IIT Kharagpur is his college
@@AKSHAR_31 Source ?
@@divyanshpal8625 😂
Better than certification courses, thank you so much Harry sir.
This video series is very very helpful Harry Bhai😎
let lan1 = `CSS`;
let lan2 = `JS`;
let name1 = `Everyone`;
let author = `Harry Bhai`;
let langs = `Hello ${name1},
This is an example.
I like ${lan1} but trying to get the knowledge of ${lan2}.
Thank You ${author} for the playlist. `;
document.body.innerHTML = langs;
Output:
Hello Everyone,
This is an example.
I like CSS but trying to get the knowledge of JS.
Thank You Harry Bhai for the playlist.
@CodeWithHarry pls next ajax and jquery
Explanation is too easy to understand thankyou Harry Sir 🙌🏻
let name = `by code with harry `;
let k = ` This is JavaScript ${ name.toUpperCase()}` ;
console.log(k);
Use this for css for now -
body{
background: linear-gradient(95deg, purple, rgb(209, 34, 34));
font-family: system-ui;
font-size: 25px;
}
this is awsome
I love this course i joined... And im new student.
let feedBack1 = course;
let feedBack2 = outstanding;
let feedBack = ` Your ${feedBack1} is, ${feedBack2}...`;
document.body.innerHTML = $feedBack;
Your course is outstanding...
13:35 the substring does not accept negative value whereas slice accepts negative this is the main difference
what is the difference between substring and substr
@prasad tandel yes you are correct
@@nimisharaj8501 The difference between them is that substring() only accepts a positive values but substr() accepts both positive as well as negative values.
let name1 = 'Harry';
let cd = 'Java Script';
let myPro =
` Hello ${name1}, How are you?
Thanks for the amazing ${cd} tutorials. Very Helpful `;
document.body.innerHTML = myPro;
console.log(myPro);
Please reply me ye first time Sikh rha muje ye template literals smj nhi aa rha kya aap apni Instagram id send kr skte h please 🙏
// template
Let teacher = "harry";
Let topic = "Javascript tutorial";
Let topic2 = "Python";
Let class = ` ${teacher } is the best teacher ${teacher } taught us many languages such as : ${topic } , ${topic2}`;
Document.body.innerhtml = class;
Just to add-> html.substring accepts (startindex and length of character) Not (startindex and endindex-1)
ThankYou Sir I am A very Old Follower Of You And What Ever I Want to learn is available on your channel this just motivates me so much thankyou again for such awsome course for free
Let fact = ' thanku so much sir !! '
Let mycode =` what a nice explanation sir ..${fact }` ;
document.body.innerHTML = mycode;
Output ---- what a nice explanation sir ..thanku so much sir !!
Please reply me ye first time Sikh rha muje ye template literals smj nhi aa rha kya aap apni Instagram id send kr skte h please 🙏
simply awesome better than any online paid course.
Very nice explanation harry bhai.....Awesome!!!
This tutorial is very useful.
Let str1= "coder";
Let str2= " js";
Let myHtml =` hello ${str1}
this is ha tutorials
, thankyou $(str1) for teaching us $(str2)
`;
document.body.innerHtml= myHtml;
your ways are just awesome, BORN TO BE A MENTOR!!
sid by side screen learning is best concept herry ji
bhai jald bazzi mai galt bolgae at 13:36
console.log( html.substring(-4)) //likhne se puri string return karega
console.log(html.substring(1,8));// returns string from index 1 to index 8
console.log(html.slice(1,8));// returns string from index 1 to index 8
console.log(html.slice(-6));// return last 6 values of the string
commenting this for others to not get confused.
love u harry bhaai
Awesome course and better understanding. Thank you Harry Sir...
From Bangladesh.
let fruit1 = 'Orange';
let fruit2 = 'apple';
let html = `this is heading
you like ${fruit1} and ${fruit2}
`;
document.body.innerHTML = html;
let name = "sawan";
let marks = 65;
myhtml = `Hello ${name}
You have secured ${marks} marks
Congratulations
`;
document.body.innerHTML = myhtml;
Explanation is easy to understand !
Thankyou so much Harry for JS Tutorial !
It is getting more interesting ❤
Ur a celebrity
Yeh harry bhai wala rohan das hain kya?
Template Literal is same as f-strings in python only the difference is here we are using ``
Ans)
name = "Ankesh";
code = `Hello ${name}`
document.body.innerHTML = code;
const htmlText = `I am writing HTML in javascript, watch this!!!
Hello, My Name is Kishan
Writing html test inside javascript and this is a paragraph.`;
document.body.innerHTML = htmlText;
*THANK YOU HARRY BRO FOR THIS TUTORIAL*
Love from Bangalore, India.
let name = ' happy ';
let fruit1 = ' apple ';
let fruit2 = ' banana ';
let htmlcode = `Hello, ${name}
Heloo falloas
I love to eat${fruit1}and${fruit2}
`;
document.body.innerHTML = htmlcode;
Thanks!
awesome harry bhai . keep uploading
const name=('Good Morning')
const dame=('Neeraj')
let color = 'red\'s'
let color1 = 'yellow'
let myname =`HELLO ji ${dame}
This is 'the' Heading
you like ${color} and ${color1}`
document.body.innerHTML = myname;
20:27
let favSport = "cricket"
let favSport2 = "Kabaddi"
let myHtml = ` Sports
your favSport is ${favSport} , ${favSport2}
`;
document.body.innerHTML = myHtml;
quetion done
Please make a to guide us how to start freelancing
Thanks For Sharing!
Sir if I use to learn the code with live server, except google crome Microsoft edge is getting open . Please help in converting to google crome
Great explanation of string methods and template literals ...
you are the Best .
Thank you sir
Harry Bhai Colleges bandh karva kai Rahengai Pakka Hai!..
Wao you are great teacher
lenght concat indexof lastindexof charat lowercase uppercase substring slice includes split replace
let name = "Omer"
let aim = "Goal is to finish JS at the end to march"
let start = "React JS"
let quizhtml = `hello I m ${name}
this is js learning class
${aim} and to start ${start}`
document.body.innerHTML = quizhtml;
let pencil1 = 'oxfiit';
let pencil2 = 'natrajan';
let rHTML = ` i like ${pencil1} and but my fav. is ${pencil2}`;
document.body.innerHTML = rHTML;
output
i like oxfiit and but my fav. is natrajan
courses - better than UDEMY, thanku harry sir
let car1 = 'bmw' ;
let car2 = 'nano';
let mycar= `Hello! ${name}
this is a BMW car
i hope you like ${car1}and ${car2}
`;
document.body.innerHTML = mycar;
Thank you sir for this playlist. Lots of love
Harry Bhi can you please share outline of this course with us so we know what we are going to study.
You are great sir
Thankyou Harry Sir!
let him = 'Harry Sir';
let nature = 'awesome';
let description = ` ${him} is ${nature}`;
document.body.innerHTML = description;
Thank you so much sir
Thank you bro you change my life 💖
I have great admiration for you.
let str1 = "mohsin";
let str2 = "hassan";
let name = `my first name is ${str1} my last name is ${str2}`;
document.body.innerHTML =name;
let x = " this is string"
let new = `javascript`${x}
This is the example of Templets method
document.write(new)
=>javascript this is string
This is the example of Templets method
let head='welcome in coding world';
let punch='AWSOME';
let para='This most beautifull thing is mind and most precious thing is time, ';
let html=`${head} ${para}if we connect both of them together the life will become ${punch}`;
document.body.innerHTML=html;
Harry bhai javascript p video bnao with important notes
You are the best
Thankyou Harry Bhai
thank you harry bhai!
Thank you so much ❤️ 🤗
let fruit1='gwava';
let fruit2='orange';
let itsHtml=`hello ${name1}
its some h1 tag
and its some fruits
${fruit1} and ${fruit2}
`
document.body.innerHTML=itsHtml;
Thanks a lot Bhaiyaaa
Sir you are my faourite teacher i love you harry bhai
Very helpful.
Bindaass harry
Let name ='Aniket';
Let greet='wishes';
Let wish ='Happy Teacher's Day';
Let myhtm='Good Morning Sir $(name) $(greet) a very $(wish)
document.body.innerHtml=myhtm;
Thank you bhai 🙏
For some reason I had to put block {} around it to work.. I hadn't used myHtml anywhere before in document
Here is what worked:
{
let name = "Krushna";
let greeting ="Good evening";
let myHtml = `Hello ${name} + ' ' + ${greeting}
`;
document.body.innerHtml=myHtml;
}
Output: Hello Krushna Good evening
20:24
let devices1 = 'SmartPhone';
let devices2 = 'PC/Laptop';
let myDevice = `Hello Everyone!
Name of two Devices are
${devices1} and ${devices2}`;
document.body.innerHTML = myDevice;
Please reply me ye first time Sikh rha muje ye template literals smj nhi aa rha kya aap apni Instagram id send kr skte h please sister 🙏
sir plz video banana bnd mat kriega mere jaise self learner k liye aise video amazing h or sir advanced topics bhi cover krte rahiye atleast jitna apko knwoledge h utna hmlog ko bhi bataiye
6 complete
thanks sir for helping us
let name = 'Harry';
console.log(`{name} is GOOD Boy
{naem} IS a Good Boy`)
const name="Anoushka";
let greeting="Good Morning";
let series1="Game of Thrones";
let series2="Money Heist";
let favSeries=` ${greeting} eveyone.
My name is ${name}.
My favourite series are ${series1} and ${series2}.`;
document.body.innerHTML=favSeries;
sir you're awesome love from pakistan
console.log("STRINGS");
const namee = "PIYU$H";
const greeting = "GOOD MORNING ";
const total = ` ${greeting}` + `${namee} `;
console.log(total);
document.body.innerHTML = total;
20:20
f1='mango';
f2='orange';
myHtml=`This is based on ${f1}
this is based on ${f2}`
document.body.innerhtml=(myHtml)
Thanx Harry
let sub1="Maths";
let sub2="Science";
let class=`This is my favorite subjects ${sub1} and ${sub2} `;
document.body.innerHTML=class;
Harry I have a doubt
CharAt and search is same
let car1 = 'buggati';
let car2 = 'rolls royce';
let car3 = 'lamborghini';
let myHTML = `Luxurious cars are ${car1} and ${car2} and ${car3}`;
document.body.innerHTML = myHTML;