وبلاگ بلیان

Coding with JavaScript For Dummies: Everything you need to know about Javascript

جلد کتاب Coding with JavaScript For Dummies: Everything you need to know about Javascript

معرفی کتاب «Coding with JavaScript For Dummies: Everything you need to know about Javascript» نوشتهٔ Carol Ann Drogus، Stephen Walter Orvis و Claudia Alves، منتشرشده توسط نشر 2020 در سال 2020. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Coding with JavaScript For Dummies Everything you need to know about Javascript programming JavaScript is most commonly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it's up to the browser to do something with it. The fact that the script is in the HTML page means that your scripts can be seen and copied by whoever views your page. Nonetheless, to my mind this openness is a great advantage, because the flip side is that you can view, study and use any JavaScript you encounter on the WWW. JavaScript can be used in other contexts than a Web browser. Netscape created server-side JavaScript as a CGI-language that can do roughly the same as Perl or ASP. There is no reason why JavaScript couldn’t be used to write real, complex programs. However, this site exclusively deals with the use of JavaScript in web browsers. JavaScript is not a programming language in strict sense. Instead, it is a scripting language because it uses the browser to do the dirty work. If you command an image to be replaced by another one, JavaScript tells the browser to go do it. Because the browser actually does the work, you only need to pull some strings by writing some relatively easy lines of code. That’s what makes JavaScript an easy language to start with. But don’t be fooled by some beginner’s luck: JavaScript can be pretty difficult, too. First of all, despite its simple appearance it is a full fledged programming language: it is possible to write quite complex programs in JavaScript. This is rarely necessary when dealing with web pages, but it is possible. This means that there are some complex programming structures that you’ll only understand after protracted studies. Secondly, and more importantly, there are the browser differences. Though modern web browsers all support JavaScript, there is no sacred law that says they should support exactly the same JavaScript. A large part of this site is devoted to exploring and explaining these browser differences and finding ways to cope with them. So basic JavaScript is easy to learn, but when you start writing advanced scripts browser differences (and occasionally syntactic problems) will creep up. Introduction 12 Javascript is everywhere 13 Javascript on the web 14 Javascript in the backend 15 Javascript as language for device apps 16 Javascript as a language for desktop applications 17 Javascript on the web 18 Websites 19 Single Page Applications 20 Libraries, frameworks and development "Vanilla Javascript" for the web 21 HTML5 APIs 23 Web Components 24 Javascript as the first language 25 Easy to use 26 Wide application areas 27 It is an open and standard language for the web 27 Multiple professions start with Javascript 28 Frontend developer: 29 Backend developer 29 Fullstack developer 29 How to learn Javascript 30 Learn Javascript and not a derivative 31 Knowledge of the web platform 32 Differences between Java and Javascript 35 Open language / proprietary language 37 Before starting 38 Uses of Javascript 39 What do you need to work with Javascript 41 Recommended prior knowledge 42 Chapter I 43 Javascript language versions 44 The evolution of Javascript 45 ECMASCript Standard 46 HTML 5 APIs 47 Language versions 48 Conclusion to Javascript versions and compatibility 50 Chapter II 51 Open a child window 52 A welcome message 53 Current date 54 Back button 55 Javascript language 56 Javascript is written to the HTML document 57 The placement of the scripts does matter 58 Ways to write Javascript scripts 59 Direct execution of Javascript code 60 Running javascript in response to an event 62 Hide Javascript scripts in old browsers 64 Hide Javascript code with HTML comments 65 Show a message for old browsers with 66 More about scripting 67 Interesting methods of placing Javascript scripts 68 Indicate the language we are using 68 Include external Javascript files 70 The Importance of Using External Javascript Code Files 71 Chapter III 73 Javascript syntax 73 Comments in the code 74 Upper case and lower case 75 Separation of instructions 76 Variables in Javascript 77 Variable concept 78 Rules for variable naming in Javascript 79 Variable names in Javascript are case sensitive 80 Declaration of variables in Javascript 81 Variable declaration with var 82 Declaration of Javascript variables with let and const 83 Scope of variables in Javascript 84 Variable scope concept 85 Global variables 86 Local variables 87 Differences between declaring variables with var, or not declaring them 89 Variable declaration with let 91 What can we save in variables 92 Data types in Javascript 94 Numeric data type 95 Boolean type 96 Data type character string 97 Escape characters in text strings 98 Chapter IV 100 Javascript operators 100 Examples of using operators 101 Arithmetic operators 102 Assignment operators 103 Examples 104 Chain operators 105 Logical operators 107 Conditional operators 109 Bit-level operators 110 Operators precedence 111 Javascript typeof operator for type control 113 Recommendations with typeof 115 Javascript control structures 116 Decision making 117 IF structure in Javascript 119 Conditional expressions 123 Nested IF statements 125 IF operator 127 Javascript SWITCH structure 128 FOR loop in Javascript 131 Sample for-loop exercise 134 WHILE and DO WHILE loops 135 WHILE loop 136 DO ... WHILE loop 138 Example of the use of while loops 140 Break and continue 141 Break 141 Continue 142 Additional example of the break statement 143 Nested loops in Javascript 144 Javascript functions 148 What is a function 149 How to write a function 150 How to call a function 151 Where do we put the Javascript functions 152 Function parameters 155 Parameters 156 Multiple parameters 158 Parameters are passed by value 159 Return values in Javascript functions 160 Returning values in functions 161 Multiple return 163 Scope of variables in functions 164 Javascript function library 166 Eval function 169 ParseInt function 170 Arrays in Javascript 173 Creation of javascript arrays 174 Data types in arrays 176 Array declaration and summary initialization 177 Array length 178 Multidimensional arrays in Javascript 181 Array initialization 185 General introduction to objects in Javascript 187 What is an object 188 How to access object properties and methods 190 How to create objects 191 Create and instantiate objects from functions 193 •Object.freeze 209 Freeze objects 212 Freeze matrices 215 Deep freezing 216 undefined in JavaScript 222 Null in JavaScript 226 Word processing 228 Smuggling of characters 230 Long text strings 231 Access the characters 233 Compare text strings 234 •String.fromCharCode 236 Handle values larger than the maximum 239 •String.fromCodePoint 239 String.raw () 245
دانلود کتاب Coding with JavaScript For Dummies: Everything you need to know about Javascript