javascript-tutorial / en.javascript.info

Modern JavaScript Tutorial
https://javascript.info
Other
23.37k stars 3.85k forks source link

Surrogate pairs examples in the Iterables lesson should be removed #3221

Open BarokDG opened 1 year ago

BarokDG commented 1 year ago

The lessons on surrogate pairs have been moved from "Datatypes/Strings" to "MIscellaneous/Unicode, String internals" but there are examples mentioning surrogate pairs on the Iterables lesson. It might be confusing for readers who haven't read the lesson on surrogate pairs before hand.

joaquinelio commented 1 year ago

mmm.. The info is relevant and I think it 's the correct place to put it

not so confusig, it s a discrete line I was suggesting an anchor link there instead,

I was just making a PR but I didnt test yet

joaquinelio commented 1 year ago

something lilke this

And it works correctly with - the tricky :) - [info:surrogate-pairs] !

adding the anchor in unicode article

didnt finish, stays as suggestion.

joaquinelio commented 1 year ago

or, you are saying to leave the line but removing the examples?

the link would be useful too

BarokDG commented 1 year ago

A link to the lesson on surrogates might work yeah. My problem with the info being in the iterators lesson is that we're learning how to specifically work with surrogate pairs without first learning what surrogate pairs are.

joaquinelio commented 1 year ago

you are right. "it works ok " + link is fine,

but later it goes a little deeper.

I wouldnt remove nor change the location of the info but rather add a little note "rare & tricky" just before the link

well, Ilya has the say

BarokDG commented 1 year ago

Yeah that sounds good as well. Thanks a lot for responding so quickly🙌🏽.

joaquinelio commented 1 year ago

Yeah that sounds good as well. Thanks a lot for responding so quickly🙌🏽.

because to cut off that part from strings was my idea... 😟

BarokDG commented 1 year ago

I think that was a correct decision. I read half of javascript.info 10 months ago but had to stop because of school and now I'm picking it up again. In my opinion it's better without it. I remember thinking it was advanced and forgetting about it quickly after I read it. The strings lesson was better this time around. I felt I learned all I needed.