Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

This short JavaScript code is amazing!


Jun 02, 2021 Article blog



Code can do a lot of interesting things, some very short code, it can be impressive, and you can learn something from it. Someone started the conversation by saying, "What's the short but amazing JavaScript code?"

This topic, caused a lot of people's attention, we are also very enthusiastic about sharing the code, below, W3Cschool sister for you to share three pieces of code.

Code snippet one:

 This short JavaScript code is amazing!1

The sharer shared the piece of code and said nothing. But there are still a lot of bulls among netizens, see how these bulls comment on this code:

Netizen I: Very interesting!

Netizen 2: Opened up a new world.

Netizen three: simple to achieve, brain hole is very big ah.

Netizen 4: Can this maze work? Can you write a piece of code that shows the path that can be connected?

Code snippet two:

 This short JavaScript code is amazing!2

'It really worked and scared me,' the sharer said. What do netizens think of this code?

Netizen one: stunned, why can this be executed ah?

Netizen 2: I'm ashamed of my loneliness... Refresh my knowledge of the code.

Netizen 3: It's heartbreaking!

 This short JavaScript code is amazing!3

Netizen 4: The result of the run turned out to be alt ("Hello, JavaScript").

Netizen 5: Very strong.

Code snippet 3:

 This short JavaScript code is amazing!4

According to the sharer, this regular expression measures prime numbers by constructing a 11111111 and forcing the regular engine to achieve a division.

What do netizens think of this code?

Netizen one: quite amazing!!! It's just that execution efficiency is a little low, and n's number of digits crosses the line.

Netizen 2: Think for a while to understand.

Netizen three: stack searched before understanding.

The three pieces of code shared above look very streamlined. I t's amazing how streamlined the code is, and it's running. I don't know, guys, the above three lines of code, how do you feel, you can leave a message below Oh.