# JavaScript :::spoiler {state="open"} **🧷 Table of Content** <br/> - **Root:** [Web Development](/Kt7xgfDNQJq12DduZa0nfw) - **Programming Language** [toc] ::: <br/> Capstone Project: Deep Reinforcement Learning in Financial Markets Developed a deep reinforcement learning (DRL) model to optimize trading strategies and maximize investment returns. Utilized historical stock price data for model training and testing. Implemented and compared three DRL algorithms: Proximal Policy Optimization (PPO), Deep Deterministic Policy Gradients (DDPG), and Soft Actor-Critic (SAC). Integrated Long Short-Term Memory (LSTM) networks as feature extractors to improve time-series data analysis and prediction accuracy. Demonstrated enhanced performance in portfolio management and risk control across different asset classes. [![JS](https://hackmd.io/_uploads/rykvfoShR.png)](https://miro.medium.com/v2/resize:fit:786/format:webp/1*sP0LH8fCUMyeB9eH2J6KGQ.png) **JavaScript** is a versatile and widely-used programming language that is essential for web development. It enables dynamic content and interactive features on websites, making it a key component of the modern web. You can easily open a web browser and open the console to start experimenting with **JavaScript** code. This interactive environment allows you to test snippets of code in real time and see immediate results, which is excellent for learning and debugging **JavaScript** is an interpreted language, which means that the code is executed line by line at runtime by the JavaScript engine in the browser or runtime environment (such as Node.js). Unlike compiled languages, where code is transformed into machine language before execution, JavaScript is parsed and executed directly. This allows for flexibility and ease of debugging, but can also impact performance. > - To optimize **JavaScript** performance, various engines have been developed. > > - For example, Facebook developed the "Flow" type checker to introduce static type checking to JavaScript, providing an additional layer of reliability and predictability to the language. > - Additionally, the "Babel" compiler has been widely used to transpile modern JavaScript (ES6+) code into backward-compatible versions for older browsers. > - These tools help developers write cleaner, more maintainable code and ensure compatibility across different environments. <br/> ## 1. JavaScript Basics ### 1.1 Variables and Scopes - [Data Type and Variable](/a7sYOYp-S-OeaIFgDpaDJQ) <!-- auto-boxing (wrap value into object, not work with null and undef)& `bigint` --> - [Data Operations](/VLvDMTdKSw-Pv3D3BikMdg) - [Statement and Scope](/xdR5eAWlSCuG5QmLQ-gbeA) ### 1.2 Functions - [Function Basis](/BBEjj8jyTOuuk6m-ezd2DA) <!-- Math... --> - [Arrow Functions](/q4R5KvNTREatpPbSV5zjkA) - [Generator Functions](/iBRCpOBdR8-R0764TwStLQ) - [Constructor Functions](/mtj0VCZUTeGRYAhYnkPGmA) <!-- - Async Functions --> ### 1.3 Loops - For Loops <!-- For...in and For...of --> - While Loops - Array and Loops ### 1.4 Objects - Object Basics <!-- const partially works(cuz they are refs)、dot/bracket notation、all types、Nested Objects、objects are references、obj cmp、destructuring、short-handed property/method--> - Working with Properties <!-- Build-in JSON (JavaScript Object Notation)、stringify、parse、... --> - Prototype and Inheritance - Common Objects <!-- localStorage、setItem、getItem、removeItem... --> ### 1.5 Closures - Mechanism for closing over scopes - Examples and applications <!-- Objects、Loops --> <br/> ## 2. Asynchronous Programming ### 2.1 Callbacks - Basic concepts - Examples ### 2.2 Promises - Basic usage - `then` and `catch` - Error handling ### 2.3 async/await - Basic usage - Error handling - Relationship with Promises ### 2.4 Event Loop and Microtasks - How the event loop works - Microtasks vs. macrotasks <br/> ## 3. DOM Manipulation ### 3.1 DOM Basics - DOM structure - Element selection (`querySelector`, `getElementById`, `getElementsByClassName`) ### 3.2 Event Handling - Registering and handling events - Event bubbling and capturing - Common event types (click, submit, input, etc.) ### 3.3 Dynamic Manipulation - Adding, removing, and modifying elements - Manipulating styles and classes <br/> ## 4. Frontend Frameworks ### 4.1 React - Basic workflow - Component lifecycle - Hooks ### 4.2 Vue - Basic concepts - Components - Lifecycle ### 4.3 Angular - Basic structure - Modules and components ### 4.4 Three.js - Basic 3D rendering concepts - Creating basic scenes <br/> ## 5. Node.js ### 5.1 Basic Server Setup - Creating a server using the `http` module - Basic routing ### 5.2 Express Framework - Basic setup - Middleware usage - Routing and request handling ### 5.3 Middleware - Definition and usage - Common middleware (body-parser, morgan, etc.) <br/> :::spoiler __Relevant Resources__ :::