Javascript beginner tutorial 7 – Strings




In this video I talk about the string data type. I recap on the escape character as well as introduce you to string concatenation.

Don’t forget to subscribe:
http://www.youtube.com/user/QuentinWatt

For collaborations and business inquiries, please contact via Channel Pages: http://ChannelPages.com/QuentinWatt Social links:
————————————————————-
Add me on twitter:

facebook group:
https://www.facebook.com/quentin.watt
————————————————————-

Original source


36 responses to “Javascript beginner tutorial 7 – Strings”

  1. HI Quentin, which projects would you recommend newbies to immerse themselves in the real world of JavaScript once they finish your course? Thanks for all your help so far man!

  2. hey, how do i put in line breaks in-between quotations? I have this code:
    var name = "Annie"
    //escape character 
    var subscriber_message = "Annie said "Thanks to everyone!""
    document.write(subscriber_message);
    //string concatenation 
    var sentence1= "My name is Annie";
    var sentence2= " and I am 25 years old";
    document.write(sentence1 + sentence2);

    When this prints, it prints as: "Annie said "Thanks to everyone!"My name is Annie and I am 25 years old.

    I want a line break between 'everyone' and 'my name..'
    I've used <BR> before, but in codes that don't have quotes and the only quotes i used are around the <BR>. 

    do you understand what i'm saying? I'm a total beginner..

    Thanks.

    ETA: I got it. This is the change I made:
    var subscriber_message = "Annie said "Thanks to everyone!" "<BR>""
    but my overall formatting is still incorrect.

    Anyone??

  3. Thanx alot Quentin for your support. Actually i started working on sapui5 in which we have to use JS. As JS is a scripting language and i dont have any previous knowledge of JS thats why i am very frustated about it.but your video provide me a ray of hope.if u provides me some suggestion about JS how to learn it to become a good programmer i am thankful to you.

  4. Just want to mention something. As a designer my teacher taught me that these "These" are not quotations marks. They are indicating inch measurement on computer keyboard. The real quotation marks are these “These” – Alt + 0147 and Alt + 0148 (on PC).
    If you use the correct ones you don't need to do this " This" in JavaScript.

    I'm not trying to be a smart ass. I'm new to JavaScript just speaking from design point of view. What do you think about this?

  5. What if someone were by some chance to say "Quentin said Thanks to all my subs"? Would you then put another escape character to ignore the first one which would otherwise cause an error? By doing so the string would then look like "Quentin said \Thanks to all my subs". Is that right?

Leave a Reply