Jump to content

Talk:JavaScript/Archive 6

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pmffl (talk | contribs) at 18:59, 15 March 2024 (new). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Archive 1Archive 4Archive 5Archive 6

Better Example than Animations

CSS3, SASS, SCSS, and LESS can all animate content without scripts. I think a better example should be provided so that people better understand what these languages can do. I.e "make a popup." DukeOfGrammar (talk) 19:11, 8 April 2021 (UTC)

I don't see this as a problem. Just because there's an alternate way to do page animations, doesn't invalidate the example of JS doing it. But good suggestion about pop-ups. I added that to the list. -Pmffl (talk) 17:12, 9 April 2021 (UTC)

Syntax - variadic function demonstration

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments says "If you're writing ES6 compatible code, then rest parameters should be preferred." So maybe replace or add a rest param example.  AltoStev Talk 12:58, 16 April 2021 (UTC)

oppose - @AltoStev: These tips aren't mandatory. It just makes easier to access a fraction of elements inside arguments. --AXONOV (talk) 10:09, 8 May 2021 (UTC)

JAVA elimination

I suggest to revert the following edits mentioning JAVA. These were illegally removed by Pmffl. It should be mentioned per WP:LEAD.

  • 17:04, May 12, 2021 - «‎Creation at Netscape: wording»
  • 16:42, May 12, 2021 - «Restored revision 1022595329 by ClueBot NG talk): Full vandal revert»
  • 22:49, April 12, 2021 - «remove Java comparison from lede - covered in the hat, the history, and a dedicated section»
  • 07:26, April 12, 2021 - «Undid revision 1017339785 by 87.55.214.141 talk) junk edit - wrong section and Node already covered»

--AXONOV (talk) 19:26, 14 May 2021 (UTC)

What do you mean by 'illegally removed'? Those are totally normal edits. One of them is restoring half a sentence that was deleted by an IP vandal. - MrOllie (talk) 23:29, 14 May 2021 (UTC)
@MrOllie: See MOS:INTRO#summarize. The JAVA is discussed in the body. No reason to remove it from lead. AXONOV (talk) 08:58, 15 May 2021 (UTC)
There are valid reasons to remove it, as I stated in my edit comment. Two more: the body of the Java article doesn't even mention JS at all, and it's best to not bloat the lede of this article. -Pmffl (talk) 12:46, 16 May 2021 (UTC)
I'd strongly argue that it belongs in the lede. It's a frequent source of confusion to people unfamiliar with the languages, and its prominently mentioned in the Mozilla Developer Network page on Javascript here. One of the most popular Javascript books "Eloquent Javascript," also mentions it in the second paragraph of the into here. OhNoitsJamie Talk 17:43, 17 May 2021 (UTC)
I think the hatnote alone is probably good enough, as it is now it seems a bit redundant. - MrOllie (talk) 18:34, 17 May 2021 (UTC)
@Ohnoitsjamie: It's fair point to mention Java. We have to follow WP:INTRO anyway. And moreover, there is a whole website devoted to JAVASCRIPT IS NOT A JAVA[1]. To say nothing of the books: [2][3] AXONOV (talk) 18:52, 17 May 2021 (UTC)

Use semi-official logo as infobox icon

The infobox currently shows pure javascript code. I feel this is confusing to users who don't understand JavaScript or programming in general. Currently, the infobox also links as comment back to a 2013 talk thread with 2 people agreeing to remove the icon. I feel that now, this logo is way more standard and universal than ever.

Semi-official logo

— Preceding unsigned comment added by Moo12101 (talkcontribs) 05:54, 11 March 2022 (UTC)

Apologies for the incredibly late reply, but I 100% agree with you, it is almost universally accepted and recognized. If there aren't any objections I'll go ahead and switch it. ~ Eejit43 (talk) 03:48, 28 October 2022 (UTC)
Never mind, seems like a consensus was made in 2015 regarding this: Talk:JavaScript/Archive 5#Why is the unofficial logo present?
Might not be a bad idea to discuss this further, however, as the acceptance of the logo has changed since then.
If not, the icon should definitely be improved, the example code is quite unhelpful, and the usage of HTML just serves to be confusing. ~ Eejit43 (talk) 03:55, 28 October 2022 (UTC)

For post related to Javascript JSON array refer. https://astrophile0.space/javascript-json-array/ — Preceding unsigned comment added by Utka05 (talkcontribs) 09:02, 7 January 2023 (UTC)

Misleading infobox caption

Current revision as of writing [4]

The caption of the infobox image currently states "Screenshot of JavaScript source code" while the image definitely shows "JavaScript source code embedded in HTML".

172.218.5.205 (talk) 04:59, 28 April 2022 (UTC)

Syntax - "In HTML documents..." example

The example given for output in HTML documents previously said "In HTML documents, this program is required for an output", I changed this to (the awkwardly worded) "In HTML documents, a program like this is required for an output" so it no longer sounds like it would require this exact code, but the example still seems unclear and not well explained. In particular, the document.querySelector() examples at the end are presented as though they're part of the "Hello, World!" equivalent, but as far as I can tell they're not? AKiwiDeerPin (talk) 10:57, 28 July 2022 (UTC)

What is this

??? 96.64.125.69 (talk) 18:09, 28 October 2022 (UTC)

Do you have a specific question regarding this talk page or JavaScript itself? If the latter I'd suggest reading the article... ~ Eejit43 (talk) 03:02, 29 October 2022 (UTC)

Microsoft did not reverse-engineer javascript

In History/Adoption by Microsoft, we can read that "Microsoft did reverse-engineer javascript". As netscape source code was available, it cannot be true, as per the definition of "reverse engineering" of wikipedia. Having the source code of a language is not at all doing so "with very little (if any) insight into exactly how it does so". 2A01:CB14:601:A00:5B8F:DF2:C3E0:199E (talk) 22:03, 11 January 2023 (UTC)

Semi-protected edit request on 17 March 2023

I have noticed some errors or mistakes in the article JavaScript and I want to correct them so I am requesting to get editing Access. Raja Abdul Rehman (talk) 09:25, 17 March 2023 (UTC)

 Not done: this is not the right page to request additional user rights. You may reopen this request with the specific changes to be made and someone may add them for you, or if you have an account, you can wait until you are autoconfirmed and edit the page yourself. Cannolis (talk) 09:31, 17 March 2023 (UTC)

Semi-protected edit request on 28 June 2023

This line: document.querySelectorAll('.multiple'); // Returns an Array of all elements with the "multiple" class Should be: document.querySelectorAll('.multiple'); // Returns an Array-like NodeList of all elements with the "multiple" class 108.28.68.152 (talk) 00:16, 28 June 2023 (UTC)

 Done MSDN agrees with you[1] Change made, thanks! TartarTorte 15:15, 29 June 2023 (UTC)

References

  1. ^ "Document: querySelectorAll() method - Web APIs | MDN". developer.mozilla.org. 7 April 2023. Retrieved 29 June 2023.

Server side usage

The current language, "JavaScript engines were originally used only in web browsers, but are now core components of some servers and a variety of applications," is misleading. JavaScript was almost immediately used in server-side applications with the introduction of LiveWire as an extension of Netscape Enterprise Server in 1996. Bob.Devereux (talk) 12:35, 9 March 2024 (UTC)

The lede fine the way it is. As stated in the Other usage section: "Initial attempts at promoting server-side JavaScript usage were Netscape Enterprise Server and Microsoft's Internet Information Services, but they were small niches. Server-side usage eventually started to grow in the late 2000s, with the creation of Node.js and other approaches." And "originally" was indeed the Navigator browser. So no changes needed. -Pmffl (talk) 01:15, 13 March 2024 (UTC)