Hướng dẫn dùng jscomplete JavaScript
React.js Beyond The Basics Show Learn fundamental and advanced concepts of React like state and side effect hooks, the context API, external state, performance optimization, asynchronous APIs, testing, deployment, and more. Node.js Beyond the Basics Learn fundamental and advanced concepts of Node like modules, event driven architecture, streams, child processes, scaling, testing, deployment, and more. React Firsts Your First React Component. First Hook. First One-way Data Flow. Components Reusability. Tree Reconciliation in Action. JavaScript Function Scopes Learn about JavaScript functions scopes vs block scopes and how they relate to the variables declarations with var/let/const React Hooks Deep Dive Build, analyze, and optimize a React app using both classes and functions with hooks. Covering React.memo and the useState, useEffect, and useCallback hooks. The Complete Introduction to React Learn about React components with functions and classes. Using JSX. Benefits of components. React Hooks. User events. Taking input form users. Programming 101 What is a Computer Program? What are variables, expressions, objects, and functions?
Node's Streams An introduction to Node's best and most misunderstood idea Skip to main
Black Lives MatterLearn Modern Full-stack JavaScript With Node, React, GraphQL, and more Frequently Updated BooksFocused Video CoursesCarefully Edited ArticlesInteractive Adaptive CoursesLearn InteractivelyWhat you learn is right there in front of you, in an editor, ready for you to experiment with. Take ChallengesValidate what you learn exactly when you learn it with relevant tests. Build StuffWrite real-life code for web and mobile apps with supervision and feedback from our experts Learn What is RelevantStop learning what you don't need to learn and focus on what gets you to your goals Keep up with ChangesDo not waste your time on out-dated content. Find the latest and newest at jsComplete. Find Your PathEach one of us needs a custom path for their learning journey. There is no one-size-fits-all path. Featured Interactive LabsJavaScript Scopes (free)Learn about JavaScript functions scopes vs block scopes and how they relate to the variable declarations with var let const Function Arguments and Rest Parameters (free)Learn about JavaScript implicit and explicit parameters and the use of rest parameters Featured BooksThe Professional Programmer ($18)Tips and advice on your journey from a beginner programmer into a professional one React.js Beyond The Basics ($28)Learn fundamental and advanced concepts of React like state and side effect hooks, the context API, external state, performance optimization, asynchronous APIs, testing, deployment, and more Featured Video CoursesGetting Started with React Native ($25)Learn how to use React Native to build production-ready, native mobile apps on both iOS and Android Full-Stack JavaScript with MongoDB, Node, and React ($25)How to use Node as a web and an API server, consume data and build user interfaces with React, read and write data with a MongoDB database. JavaScript tồn tại đến nay là hơn 20 năm. Vậy mà code JavaScript từ lâu giờ vẫn chạy tốt. Bạn có bao giờ thắc mắc lý do tại sao không? Đó là vì những tính năng cũ của JS vẫn được hỗ trợ mặc cho rất nhiều tính năng mới được tạo ra mỗi năm.
Nghĩa là
những thay đổi của JavaScript mặc định sẽ không được kích hoạt. Để kích hoạt những tính năng mới này, bạn cần chủ động khai báo Vậy use strict là gì? Sau đây, mình sẽ cùng tìm hiểu về use strict trong JS. Chỉ dẫn này giống như một chuỗi ký tự: Ví dụ:
Ngoài đặt ở đầu của file JS,
Một số câu hỏi về use strict trong JSNếu không đặt Câu trả lời là KHÔNG. Chỉ dẫn Ví dụ sau đây sẽ không kích hoạt strict mode trong JavaScript:
Có thể hủy strict mode được không? Câu trả lời cũng là KHÔNG. Nếu bạn đã khai báo Có nên sử dụng Câu trả lời là CÓ.
Use strict với consoleTrước tiên, bạn cần biết rằng console ở Dev Tools cũng không mặc định sử dụng strict mode. Vì vậy, bạn cần phải đặt Nhưng nhớ rằng, Vì vậy, hãy nhấn tổ hợp Shift Enter để xuống dòng sau khi khai báo Quy trình sử dụng
Tổng kếtSau đây là một số kiến thức cần nhớ về use strict trong JS:
★ Nếu bạn thấy bài viết này hay thì hãy theo dõi mình trên Facebook để nhận được thông báo khi có bài viết mới nhất nhé: |