Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34323

Re: simple question

Path csiph.com!aioe.org!news.mb-net.net!open-news-network.org!.POSTED.214.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: simple question
Date Sun, 12 Nov 2017 18:33:37 +0100
Organization PointedEars Software (PES)
Lines 58
Message-ID <4024886.LvFx2qVVIh@PointedEars.de> (permalink)
References <super70s-C3F170.07042612112017@reader02.eternal-september.org> <87375jwp8x.fsf@bsb.me.uk>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
Injection-Info gwaiyur.mb-net.net; posting-host="214.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.226.214"; logging-data="25729"; mail-complaints-to="abuse@open-news-network.org"
User-Agent KNode/4.14.2
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Cancel-Lock sha1:jjEIqfgm7ePigaQgujSx6m3Zy8A=
X-User-ID U2FsdGVkX1+DhM++EnLoyUXHbST3RWztPQWxXSacPA9jLSJ8vfGhGA==
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Xref csiph.com comp.lang.javascript:34323

Show key headers only | View raw


Ben Bacarisse wrote:

> super70s <super70s@super70s.invalid> writes:
>> <script language="JavaScript">

Invalid, thrice.  Automatically killfiled because of the second.

>> <!-- Begin

Nonsense.

>> var msg = new Array();

The right-hand side is deprecated in favor of “[]”.

>> Stamp = new Date();

Undeclared variable (“var” or “const” missing), unwise identifier (is not a 
constructor).

Use JSHint.

>> today = Stamp.getDate();

Date.prototype.getDate() returns the number of the day of a month, not a 
date string.

>   function writeTip(msgs) {
>       document.write(msgs[new Date().getDate()];
>   }
> 
> and then call it with different arrays from two other script elements
> (I'll show only one):
> 
>   <script language=JavaScript>
>       writeTip([
>          "dummy",
>          "Happy first!",
>          ...
>          "All over for this month."
>       ]);
>   </script>
> 
> No doubt I have lots of typos since this has not been machine checked.

More than that, your code, if obvious syntax errors are corrected, simply 
would not do what you think it does.

Also, the HTML is still invalid.

<http://validator.w3.org/>
 

Head shaking,
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

simple question super70s <super70s@super70s.invalid> - 2017-11-12 07:04 -0600
  Re: simple question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-11-12 14:22 +0000
    Re: simple question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-12 18:33 +0100
      Re: simple question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-11-12 20:28 +0000
        Re: simple question super70s <super70s@super70s.invalid> - 2017-11-12 15:11 -0600
          Re: simple question Andrew Poulos <ap_prog@hotmail.com> - 2017-11-13 13:26 +1100
        Re: simple question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-12 22:39 +0100
          Re: simple question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-11-13 01:20 +0000
            Re: simple question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-13 03:49 +0100
            Re: simple question Julio Di Egidio <julio@diegidio.name> - 2017-11-13 16:45 -0800

csiph-web