Unicode Characters & Escape Sequences

Video

JavaScript Notes

JavaScript
    // Unicode Characters in JavaScript
    // Escape Sequences in JavaScript
    // http://www.unicode.org/charts
    // String.fromCharCode(num [, num, num])
    // myString.charCodeAt(index)
    // \u0434
    // \0 \’ \” \\ \n (new line) \r (carriage return) \t (tab)
    
    let yesRU = 'u0434\u0430'; // Russian – yes
    let milkDK = 'm\u00E6lk'; // milk
    let breadNO = 'br\u00F8d'; // bread
    let tomorrowES = 'ma\u00F1ana'; // tomorrow
    let emojiJP = '\u3047\u3082\u3058'; // Hirigana - emoji
    
    console.log(milkDK.charCode(2)); // 
    let s = String.fromCharCode(0x0434); 
    console.log(s);