Is my barcode valid? An EAN-8 barcode includes 7 digits of information and an 8th checksum digit.

The checksum is calculated by multiplying the digits by 3 and 1 alternately, adding the results, and subtracting from the next multiple of 10.

For example, given the digits 2103498:

Digit:        2   1   0   3   4   9   8
Multiplier:   3   1   3   1   3   1   3
Result:       6   1   0   3  12   9  24


The sum of these resulting digits is 55, so the checksum digit is 60 - 55 = 5



The Challenge

Your task is to, given an 8 digit barcode, verify if it is valid - returning a truthy value if the checksum is valid, and falsy otherwise.


You may take input in any of the following forms:


A string, 8 characters in length, representing the barcode digits
A list of 8 integers, the barcode's digits
A non-negative integer (you can either assume leading zeroes where none are given, i.e. 1 = 00000001, or request input with the zeroes given)

Builtins that compute the EAN-8 checksum (i.e, take the first 7 digits and calculate the last) are banned.
This is code-golf, so the shortest program (in bytes) wins!




Test Cases

20378240 -&gt; True
33765129 -&gt; True
77234575 -&gt; True
00000000 -&gt; True

21034984 -&gt; False
69165430 -&gt; False
11965421 -&gt; False
12345678 -&gt; False
JavaScript (ES6), 41 40 38 bytes
Saved 2 bytes thanks to @ETHProductions and 1 byte thanks to @Craig Ayre.
s=&gt;s.map(e=&gt;t+=e*(i^=2),t=i=1)|t%10==1

Takes input as a list of digits.
Determines the sum of all digits, including the checksum.
If the sum is a multiple of 10, then it's a valid barcode.
Test Cases


let f=

s=&gt;s.map(e=&gt;t+=e*(i^=2),t=i=1)|t%10==1

console.log(f([2,0,3,7,8,2,4,0]));
console.log(f([3,3,7,6,5,1,2,9]));
console.log(f([7,7,2,3,4,5,7,5]));
console.log(f([0,0,0,0,0,0,0,0]));

console.log(f([2,1,0,3,4,9,8,4]));
console.log(f([6,9,1,6,5,4,3,0]));
console.log(f([1,1,9,6,5,4,2,1]));
console.log(f([1,2,3,4,5,6,7,8]));