视频教程笔记:Javascript Essential Training by Morten Rand-Hendriksen from Linkedin

本文深入探讨了JavaScript遵循的ECMAScript标准,包括最新的ECMAScript2015(ES6)。介绍了jQuery库简化网站JavaScript使用的方法,以及AngularJS、React、Vue.js等前端框架如何简化复杂Web应用的开发。讨论了JavaScript的加载策略,如延迟加载和异步加载,以及语法和变量作用域的最佳实践。最后,提供了DOM操作和资源链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

JavaScript conforms to the ever-evolving ECMAScript standard.


ECMAScript 2015 is the current cutting-edge  specification, previously known as ECMAScript 6 (ES6).


jQuery
Library of JavaScript functions
Introduces CSS-like syntax and several visual and UI enhancements
Simplifies the use of Javascript in websites
An abstraction of the core language

JavaScript Frameworks

Angular JS, React, Vue.js, and so on are front-end application frameworks used to simplify the building of advanced interactive web-based applications.


Javascript Loading Methods:

  • Right away loading
  • Asynchronous loading
  • Deferred loading

 

Here’s how a page loads a script with defer, put in the head tag:

With defer
Image source: https://flaviocopes.com/javascript-async-defer/

 


The script is fetched asynchronously, and it’s executed only after the HTML parsing is done.

Parsing finishes just like when we put the script at the end of the body tag, but overall the script execution finishes well before, because the script has been downloaded in parallel with the HTML parsing.


JavaScript is case sensitive and using camelCase is recommended. Whitespace matters only to humans, not to JavaScript. End each statement with a semicolon is recommended. Comments should be used liberally to assist understanding of the code. 


Variable declared without "var" will have global scope automatically.


DOM Element Creation Methods:

.createElement(); //create an element.

.createTextNode(); //create text node.

.appendChild(); //place one child node inside another.


Inline CSS:

.hasAttribute("style"); /*does the element has style? */

.getAttribute("style"); /*get the inline styles.*/

.setAttribute("style", "color:red"); /* add css property.*/

.removeAttribute("style"); /*remove inline styles.*/


break; // terminate the current loop.

continue; //terminate the current iteration of the loop


Tips and Resources:

https://brave.com/ a browser

Ctrl+Shift+J to open console in Chrome.

When writing in console, hit shift + enter keys to switch to the next line without adding a line break.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

http://jslint.com/

https://www.minifier.org/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值