Тёмный
No video :(

JavaScript Unicode Characters and Escape Sequences 

Steve Griffith - Prof3ssorSt3v3
Подписаться 102 тыс.
Просмотров 13 тыс.
50% 1

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@rotrose7531
@rotrose7531 4 года назад
The way you care every details is not only applied to javascript, everyone who want to use programming to do or change something should come here to learn the craftsmanship from you. Thank you.
@zackisser2451
@zackisser2451 6 лет назад
You deserve more subscribs , great tutorial .
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 лет назад
I agree! :) Please share.
@sshvibha
@sshvibha 4 года назад
really helpful..thanks a lot sir..i want to complete this whole playlist...hope i do it
@Amine-tl2ul
@Amine-tl2ul 4 года назад
keep up the good work man you deserve more likes and more subs 😍😍
@yarik83men51
@yarik83men51 4 года назад
Very nice... I'll be watching all Your videos...
@maru_nuna
@maru_nuna Год назад
Helpful video 🎉 Thank you!
@chesterxp508
@chesterxp508 3 года назад
Brilliant tutorials !!!
@Spunky_Tx
@Spunky_Tx Месяц назад
@rolco6536
@rolco6536 Год назад
Hi Steve, Thanks for the video. Anwy, I still don't understand about and \f. Could you please explain more about escape sequences, maybe part II of this video :D Take care
@SteveGriffith-Prof3ssorSt3v3
Escape sequences are just a way of embedding special characters inside strings. is a new line. \t is a tab. \\ is a \. is a carriage return (similar to the new line just depends on which OS you are using). \f is formfeed (which is good for printers but useless in the terminal).
@Captinshankey
@Captinshankey 3 года назад
This might be a dumb question but, for the two tabs, " \t\ta" could you use " \t+\" to achieve the same results?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Escape sequences are different than regular expressions. You can't use the RegExp special characters here.
@farisarx5552
@farisarx5552 4 года назад
Thank you
@johnywhy4679
@johnywhy4679 4 года назад
i noticed if i put the `log` shortcut at the bottom of the file, it doesn't get hoisted, and when i use it i get `Cannot access 'log' before initialization` Why? In your hoisting lesson you taught that - variable declaration is hoisted but not it's assignment. - definition of a function is hoisted, but not a function expression. According to that lesson, therefor, because this isn't getting hoisted, it's either a variable assignment, or a function expression. `log=console.log` Which one? It doesn't look like either a variable assignment, or a function expression, to me. Thx!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
Hoisting with let and const work slightly differently than with var and function declarations (which is first hoisting tutorial from a few years ago) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cHyydUnsaWI.html
@johnywhy4679
@johnywhy4679 4 года назад
What's the official JS name for your `log` shortcut? "Shortcut"? Alias? Function? Thx!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
I call it an alias, but I have heard people use shortcut as well. You can create aliases for any function or property. It has to do with how JS handles primitives vs objects. Primitives - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fLKzh4L00TI.html Deep vs shallow copies - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-duyshh9Fs1U.html
@johnywhy4679
@johnywhy4679 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 Wow, i'm surprise it doesn't have a formal name, like "functional variable" or something.
@johnywhy4679
@johnywhy4679 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 Isn't it called a "function expression"?
@slickwillie3376
@slickwillie3376 4 года назад
I've got a serious problem, not only with JS, but html and python3 can't seem to recognize utf-8 either. Windows 10 regional settings were okay, but I added utf-8 support and the problem remains. I'm pulling my hair out. LOL. 😀
@johnywhy4679
@johnywhy4679 4 года назад
i noticed this works, without `let`. Is it bad? ```` L = console.log ````
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
Without the let (or var or const) the variable will be created in the global scope and also be added as a property of the window object. Neither of which are likely what you want. It's like a safety catch. To avoid doing this by mistake, add "use strict"; to the top of your JS file.
@johnywhy4679
@johnywhy4679 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 Why wouldn't i want a shortcut to console.log created in the global scope or added as a property of the window object? i thought 'use strict' is only for older browsers thx
@johnywhy4679
@johnywhy4679 4 года назад
If this works: ` let log = console.log ` then why not this? ` let ById = document.getElementById `
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
Yes. You can do that. One that you will see people using (who used to use jQuery or the prototype library) is: let $ = document.querySelector( ) let $$ = document.querySelectorAll( )
@johnywhy4679
@johnywhy4679 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 What am i doing wrong? With parens, i get: "TypeError: Failed to execute 'getElementById' on 'Document': 1 argument required, but only 0 present. Without parens i get: "TypeError: Illegal invocation
Далее
JavaScript Function Currying
11:41
Просмотров 15 тыс.
Mathias Bynens: JavaScript ♥ Unicode
25:42
Просмотров 7 тыс.
Inserting Special Characters in JavaScript Strings
10:40
ES5 Custom Object Methods, Getters, and Setters
9:49
Logical Short-Circuiting in JavaScript
9:51
Просмотров 6 тыс.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
SHA: Secure Hashing Algorithm - Computerphile
10:21
Просмотров 1,2 млн
Escape Sequences In Java #4
8:55
Просмотров 132 тыс.
The Unreasonable Effectiveness Of Plain Text
14:37
Просмотров 599 тыс.