From:                            "顾佳凯" <[email protected]>
Sent:                              Tuesday, 27 September 2022 00:53
To:                                 "Tyler McGinnis" <[email protected]>
Subject:                         Re: Bytes: The New Wave of JavaScript
 

It can be explained like this: an expression usually needs a variable to receive its value.

image.png

MDN Expression and Operators

 

顾佳凯 <[email protected]> 于2022年9月27日周二 08:44写道:

image.png

Yes, it works in Chrome browser. Adding a unary operation in front of a function will force the parser to treat the part after it as an expression.

This Stack Overflow question teaches me. 

image.png

Why it works in Chrome and not work in a common JS file. It's a question deserving to explore.

When I use a variable to receive the expression value. It works for me.

Interesting question. Thank you for your nice newsletter.❤️❤️❤️❤️❤️ 

image.png

 

Tyler McGinnis <[email protected]> 于2022年9月27日周二 08:03写道:

Interesting! Try running it in your browser console. That's where I ran it. 

 

On Mon, Sep 26, 2022 at 6:02 PM 顾佳凯 <[email protected]> wrote:

+[newsletter, tagline].forEach((el) => console.log(el))

 

This solution is not work for me.

When I run `node xxx.js`, I still get an error-"ReferenceError: Cannot access 'tagline' before initialization".

Pls help me. Looking forward to your reply.❤️❤️❤️❤️❤️

+ [新闻通讯,标题] . forEach ((el) = > console.log (el))

 

Tyler from ui.dev <[email protected]> 于2022年9月27日周二 01:11写道:

 

Bytes

Welcome to #122.

Congrats to Janackeh for winning last week’s Airpods Max!

This issue we’ll be giving away a Durgod Taurus K320 TKL Mechanical Keyboard. As you probably know by now, we’re big fans of early 2000’s hip hop. The first person to send us the specific early 2000’s hip hop song we’re thinking of wins. Here’s a clue – the artist who sings this song originally went by Kris Kringle.

This week, we’ve got HTML Emmy’s, Age of Empires II cheat codes for your JavaScript, and a badly damaged pituitary gland. Let’s unpack.


Eyeballs logo

The Main Thing

Misko's face put on Quicksilver's body

The Qwiksilver ®

Move Qwik and break things

You can always tell something is cool-and-edgy when it intentionally misspells its own name – Boyz II Men, Linkin Park, Froot Loops.

And now there’s Qwik — an HTML-first framework that just released its first beta, and claims to offer the “fastest possible page load times, regardless of the complexity of your website.”

We’re usually a little dubious of the “blazingest” claims, but the team behind Qwik has definitely earned the benefit of the doubt: Miško Hevery (creator of AngularJS), Manu Almeida (co-creator of Gin and Stencil), and Adam Bradley (co-creator of Ionic and Stencil) are basically the Webvengers.

Like React, Qwik is component based. But unlike React (and every other current-gen framework), Qwik renders your site’s UI in a totally unique way that doesn’t require hydration at all. (Bobby Boucher from Waterboy is in shambles.)

Why not hydrate? Because hydration is pure overhead that duplicates work and slows down your app, especially as you add more JavaScript (and we all know you’ll be adding more JavaScript).

So instead, Qwik introduced Resumability — a new rendering paradigm that allows fully interactive sites to load with a tiny amount of JavaScript, then pick up from where the server left off. As your users interact with your site, the relevant parts of it load on-demand.

This “precision lazy-loading” is possible because Qwik apps are fully serialized as HTML. So with server-side rendering, the whole app can be shipped to the browser as just HTML, where it will “resume” loading where it left off — without needing to execute any JavaScript.

Hypothetically, this could mean that Qwik is a real-life version of an Age of Empires II cheat code: you can add as much JavaScript as you want to your site, and still get a perfect Lighthouse score (you don’t even have to type in “cheese steak jimmy’s” to activate it).

Bottom Line: Qwik feels like one of the most promising new JavaScript frameworks yet, because 1) it’s solving the performance problem in a way that works with most developers’ existing skills and preferences, and 2) it’s built by a team that knows how to scale OSS UI frameworks. Stay tuned.


Courier logo

Our Friends
(With Benefits)

Ross from friends laughing sarcastically

Laughing about building notifications so we don't cry

Courier gave my team so much time for activities

Newton’s 3rd law of motion clearly states that, “building app notifications always takes 5x longer than you think.”

And that might be understating it now that we have so many different platforms to worry about (email, SMS, web and mobile push, Slack, and tons more).

That’s what makes Courier so amazing. They give you complete notification infrastructure with one API that you can set up in an afternoon.

That API integrates with over 50 notification channels, and it handles everything — templating, routing, automations, even logging and analytics. It’s your PM’s *wildest* dream come true.

Courier is used by Fortune 500 companies and startups like Lattice and LaunchDarkly to save an average of 480 engineering hours a year. That’s a lot more time for hide and go seek Fridays team building.

The best part? Courier lets you send your first 10,000 notifications of every month for free (no credit card required).

Check it out. 👈


The Job Board Logo

The Job Board

Senior or Staff Front-end Engineer

 

100% Remote

React

 

Close.com is looking for 3 experienced individuals that have a solid understanding of React and want to help design, implement and launch major user-facing features. Close is a 100% globally distributed team of ~55 high-performing, happy people that are dedicated to building a product our customers love.


Spot the Bug logo

Spot the Bug

Sponsored by FusionAuth

This technical deep dive covers everything you need to know about Multi-Factor Auth — including, “What is it?” and, “Ok but seriously, what is it though?”

const newsletter = "Bytes"

const tagline = "Your weekly dose of JavaScript"

 

[newsletter, tagline].forEach((el) => console.log(el))