|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/javascript-functions-objects-and-classes-for-beginners/
课程评论:没有评论
课程名称:初学者的JavaScript函数、对象和类 课程概述:本课程专门为想要学习JavaScript基础知识的初学者设计,重点讲解函数、对象和类的基本概念。参与者将深入理解这些重要的编程概念,并学习如何运用它们构建动态和互动的 Web 应用程序。 在JavaScript中,对象的概念与现实生活中的物体相似。例如,一个杯子或汽车可以被理解为对象。JavaScript中的对象是独立的实体,具有属性和类型。对象的属性定义了其特征,就像杯子的颜色、设计、重量和材质等属性。通过简单的点符号,可以访问对象的属性。 函数是JavaScript的基本构建块,属于JavaScript程序的一部分,执行特定的任务或计算值。使用函数之前,必须在其调用范围内定义它。 类实际上是“特殊函数”,并且有两种语法构成:类表达式和类声明。函数声明会被提升,而类声明不会,这意味着在使用类之前,需要先声明类,否则会出现引用错误。 在本课程中,您将学习如何创建对象、函数和类。通过本课程的学习,您将为开发更复杂的Web应用奠定坚实的基础。
This course is designed for beginners who want to learn the fundamentals of JavaScript functions, objects, and classes. Participants will gain a solid understanding of these essential concepts and how to use them to build dynamic and interactive web applications.Objects in JavaScript, just as in many other programming languages, can be compared to objects in real life. The concept of objects in JavaScript can be understood with real life, tangible objects like a cup or car..In JavaScript, an object is a standalone entity, with properties and type. Compare it with a cup, for example. A cup is an object, with properties. A cup has a color, a design, weight, a material it is made of, etc. The same way, JavaScript objects can have properties, which define their characteristics.A JavaScript object has properties associated with it. A property of an object can be explained as a variable that is attached to the object. Object properties are basically the same as ordinary JavaScript variables, except for the attachment to objects. The properties of an object define the characteristics of the object. You access the properties of an object with a simple dot-notation:Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure-a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.Classes are in fact "special functions", and just as you can define function expressions and function declarations, the class syntax has two components: class expressions and class declarations.An important difference between function declarations and class declarations is that function declarations are hoisted and class declarations are not. You first need to declare your class and then access it, otherwise code like the following will throw a ReferenceError.In this course you will learn how to create objects ,functions and classes.