Skip to main content
added 11 characters in body; added 18 characters in body
Source Link
Tom
  • 3.1k
  • 9
  • 22

#JavaScript ES6, 9090 81 Bytes

f=a=>{i=new Image();i.src="//placehold.it/1x1";i.onload=b=>a(true1);i.onerror=c=>a(false);} 

#JavaScript ES6, 22 21 bytes (Invalid)

Some browsers don't fully support, or produce the expected result when using navigator.onLine.

f=a=>navigator.onLine 

#JavaScript ES6, 90 Bytes

f=a=>{i=new Image();i.src="//placehold.it/1x1";i.onload=b=>a(true);i.onerror=c=>a(false);} 

#JavaScript ES6, 22 21 bytes (Invalid)

Some browsers don't fully support, or produce the expected result when using navigator.onLine.

f=a=>navigator.onLine 

#JavaScript ES6, 90 81 Bytes

f=a=>{i=new Image();i.src="//placehold.it/1x1";i.onload=b=>a(1);i.onerror=c=>a()} 

#JavaScript ES6, 22 21 bytes (Invalid)

Some browsers don't fully support, or produce the expected result when using navigator.onLine.

f=a=>navigator.onLine 
added 235 characters in body
Source Link
Tom
  • 3.1k
  • 9
  • 22

#JavaScript ES6, 90 Bytes

f=a=>{i=new Image();i.src="//placehold.it/1x1";i.onload=b=>a(true);i.onerror=c=>a(false);} 

#JavaScript ES6, 22 21 bytes (Invalid)

Some browsers don't fully support, or produce the expected result when using navigator.onLine.

f=a=>navigator.onLine 

#JavaScript ES6, 22 21 bytes

f=a=>navigator.onLine 

#JavaScript ES6, 90 Bytes

f=a=>{i=new Image();i.src="//placehold.it/1x1";i.onload=b=>a(true);i.onerror=c=>a(false);} 

#JavaScript ES6, 22 21 bytes (Invalid)

Some browsers don't fully support, or produce the expected result when using navigator.onLine.

f=a=>navigator.onLine 
added 19 characters in body
Source Link
Tom
  • 3.1k
  • 9
  • 22

#JavaScript ES6, 2222 21 bytes

f=()=>navigatorf=a=>navigator.onLine 

#JavaScript ES6, 22 bytes

f=()=>navigator.onLine 

#JavaScript ES6, 22 21 bytes

f=a=>navigator.onLine 
Source Link
Tom
  • 3.1k
  • 9
  • 22
Loading