🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51600

Re: Operator ||

#51600
From: Cezary Tomczyk
Date: Tue, 17 Nov 2015 16:20
23 lines
1884 bytes
W dniu 11/17/2015 o 3:40 PM, Romek pisze:
> Witam,
>
> język javascript jest mi zupełnie obcy. Pewne potrzebne mi informacje
> znalazłem bibliotece jQuery. Ponieważ nie rozumiem zapisu proszę o
> pomoc i wyjaśnienie. W funkcji jest zapis :
>
> jQuery.fn.extend({ offset: [...] return { top: box.top +
> (win.pageYOffset || docElem.scrollTop)-(docElem.clientTop || 0),
> left: box.left + (win.pageXOffset || docElem.scrollLeft) -
> (docElem.clientLeft || 0) [...]
>
>
> jak jest wartość wyrażenia (win.pageYOffset || docElem.scrollTop) lub
> (docElem.clientTop || 0). Z dokumentacji JS wynika, że operator OR
> zwraca wartości TRUE, FALSE i nie mogę tego dopasować do powyższego
> wyrażenie. Czego nie wiem. Proszę o krótkie wyjaśnienie.

https://developer.mozilla.org/pl/docs/Web/JavaScript/Reference/Operators/Logical_Operators

-- 
Cezary Tomczyk
http://www.ctomczyk.pl/
Technical Details
Message-ID: <6d160$564b53e6$6def49cc$10341@nntpswitch.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!nntpswitch.blueworldhosting.com!not-for-mail
References: <8c1d2c90-f115-4a39-b7f2-946ba4cd634a@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!nntpswitch.blueworldhosting.com!not-for-mail
Subject: Re: Operator ||
Newsgroups: pl.comp.lang.javascript
References: <8c1d2c90-f115-4a39-b7f2-946ba4cd634a@googlegroups.com>
From: Cezary Tomczyk <cezary.tomczyk@gmail.com>
Date: Tue, 17 Nov 2015 17:20:52 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101  Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <8c1d2c90-f115-4a39-b7f2-946ba4cd634a@googlegroups.com>
Message-ID: <6d160$564b53e6$6def49cc$10341@nntpswitch.blueworldhosting.com>
X-Complaints-To: abuse@blueworldhosting.com
Organization: BWH Usenet NNTPSwitch-Cluster
Lines: 23
NNTP-Posting-Date: Tue, 17 Nov 2015 11:20:54 -0500
X-Trace: 6d160564b53e6c84aec6910341
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit