Bỏ qua đến nội dung

Sử dụng

Cách bạn sử dụng JavaScript

Cân nhắc giữa JavaScript/TypeScript

We're now firmly in the TypeScript era. 67% of respondents stated they write more TypeScript than JavaScript code – while the single largest group consisted of people who only write TypeScript.

Bạn chia thời gian giữa việc viết code JavaScript và TypeScript như thế nào?
0%
20%
40%
60%
80%
100%
1

100% JS

915
2

|

559
3

|

446
4

|

185
5

50/50

625
6

|

352
7

|

1,245
8

|

3,172
9

100% TS

3,936
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Compiled Code Balance

It should come as no surprise that in 2024, almost all of our JavaScript code goes through a build step. While bundlers and build tools certainly add complexity to our development process, they are most likely here to stay.

What proportion of the JavaScript code you write for the browser goes through a build step?
0%
20%
40%
60%
80%
100%
1

0% Compiled

262
2

|

185
3

|

192
4

|

118
5

50%

629
6

|

233
7

|

1,020
8

|

2,449
9

100% Compiled

5,927
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

AI Code Generation

For all the talk of AI-assisted coding, most of us still only use AI tools sparingly. And in fact, a whole 20% do not use them whatsoever to produce code.

What proportion of the code you produce is AI-generated?
0%
20%
40%
60%
80%
100%
1

0% AI

2,263
2

|

4,319
3

|

2,573
4

|

837
5

50%

751
6

|

285
7

|

270
8

|

55
9

100% AI

18
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Sử dụng JavaScript

It's always good to know in what context respondents are writing JavaScript code, and the vast majority are using it as part of their day job.

Bạn chủ yếu sử dụng JavaScript trong ngữ cảnh nào?
Multiple
0%
20%
40%
60%
80%
100%
1

Chuyên nghiệp

10,842
2

Như một sở thích

4,593
3

Như là một sinh viên

1,143
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Sử dụng JavaScript

Virtually every respondent stated that they use JavaScript for frontend development, which makes sense given the language's origins.

Bạn sử dụng JavaScript cho mục đích gì?
Multiple
0%
20%
40%
60%
80%
100%
1

Frontend Development

11,268
2

Backend Development

7,345
3

Mobile Apps

2,994
4

Desktop Apps

2,072
5

Data Visualization

1,653
6

Graphics & Animation

1,302
7

Data Analysis

854
8

Game Development

651
9

Machine Learning

263
10

Embedded Apps

258
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Ngành công nghiệp

While the largest industry sector consisted of developers building tools for other developers, the highest-paying one turned out to be Advertising.

Bạn làm việc trong (những) ngành công nghiệp nào?
Multiple
0%
20%
40%
60%
80%
100%
1

Công cụ lập trình & kỹ thuật

4,299
2

Tư vấn & Dịch vụ

3,555
3

Thương mại điện tử & Bán lẻ

2,668
4

Tài chính

1,796
5

Công cụ Marketing/Bán hàng/Phân tích

1,558
6

Giáo dục

1,494
7

Giải trí

1,256
8

Chăm sóc sức khỏe

1,035
9

Tin tức, truyền thông & blog

939
10

Chính phủ

836
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Mô hình Ứng dụng

Despite modern JavaScript meta-frameworks now supporting intricate rendering strategies, the most common application patterns remained the most traditional ones: single-page apps and server-side rendering.

Bạn đã sử dụng mô hình kiến trúc và rendering nào trong năm qua?
Multiple
0%
20%
40%
60%
80%
100%
1

Ứng dụng đơn trang (SPA)

10,027
2

Hiển thị phía máy chủ (SSR)

6,559
3

Tạo trang web tĩnh (SSG)

5,072
4

Ứng dụng đa trang (MPA)

4,399
5

Tái tạo một phần

2,320
6

Kiến trúc đảo

1,573
7

Tăng cường tiến bộ

1,480
8

Tạo tĩnh tăng phần

1,053
9

SSR Streaming

956
10

Hiển thị trước một phần

906
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Điểm đau của JavaScript

Code architecture is always a concern once a codebase gets past a certain size, so it makes sense that it topped the rankings of overall JavaScript pain points, followed by state and dependency management.

Những khía cạnh nào của JavaScript bạn gặp khó khăn nhất?
Multiple
0%
20%
40%
60%
80%
100%
1

Kiến trúc code

3,719
2

Quản lý trạng thái

3,290
3

Quản lý phụ thuộc

3,053
4

Công cụ xây dựng

2,925
5

Hiệu suất

2,538
6

Debug

2,355
7

Quản lý Ngày

2,338
8

2,338
9

Code bất đồng bộ

1,151
10

Tìm kiếm package

1,102
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

There are currently quite a few TC39 proposals that are on the verge of becoming a reality. Temporal and Decorators stood out this year as the ones respondents were most excited about.

Which of these active JavaScript proposals are you most excited about?
Multiple
0%
20%
40%
60%
80%
100%
1

6,637
2

3,392
3

1,312
4

1,259
5

978
6

888
7

750
8

695
9

669
10

462
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Tính năng đang thiếu

While the lack of native static typing has long been felt by the community, it's interesting to see Signals making an entrance at number 3 on this list, despite not being part of the most popular front end framework.

Theo bạn, hiện tại JavaScript đang thiếu gì?
Multiple
0%
20%
40%
60%
80%
100%
1

Kiểu tĩnh

5,403
2

Thư viện chuẩn

4,378
3

3,985
4

2,362
5

1,919
6

1,905
7

1,889
8

1,366
9

928
10

701
11

356
12

307
13

Câu trả lời khác

169
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

It's clear that survey respondents want native types, and that they hope to seem them implemented with a TypeScript-like syntax.

This year's question phrasing sadly did not make a clear distinction between runtime types and TypeScript-like type-as-annotations, so it remains to be seen which of these two paths will gain the community's favor.

How would you like to see native types implemented in JavaScript?
0%
20%
40%
60%
80%
100%
1

As similar to TypeScript as possible

8,362
2

Using comments, similar to JSDoc

1,037
3

I would not like to see them implemented

1,000
4

Type Annotations

5

Similar to Java

6

Similar to Rust

7

Similar to TypeScript

8

Similar to Python

9

Câu trả lời khác

225
0%
20%
40%
60%
80%
100%
% của người trả lời câu hỏi

Hài lòng với Công nghệ Web

Bạn hài lòng với trạng thái chung của công nghệ web như thế nào?
1
2
3
4
5
2020
2021
2022
2023
2024
1
2
3
4
5
Trung bình {axis}

Hài lòng với JavaScript

Bạn hài lòng với trạng thái chung của JavaScript như thế nào?
1
2
3
4
5
2020
2021
2022
2023
2024
1
2
3
4
5
Trung bình {axis}

Tài nguyên được đề xuất

Your Path to Becoming a Senior Web Developer!
Will Sentance
Codesmith

Your Path to Becoming a Senior Web Developer!

Deep dive into JavaScript, the most popular framework React, Web performance, CSS, deploying websites, TypeScript, and functional JavaScript to become a professional web developer today.
Expand Your Abilities to the Server and Master the Fullstack
Jem Young
Netflix

Expand Your Abilities to the Server and Master the Fullstack

Set up servers, create APIs, and deploy your code to the world by learning the full stack.
Cảm ơn các đối tác đã hỗ trợ chúng tôi! Tìm hiểu thêm.