var numbers = [15.5, 2.3, 1.1, 4.7]; function getSum(total, num) { return total + Math.round(num); } function myFunction(item) { var a = numbers.reduce(getSum , 0); console.log(a) } myFunction();
1 2 3 4 5 6 7 8 9
var numbers = [15.5, 2.3, 1.1, 4.7]; function getSum(total, num) { return total + Math.round(num); } function myFunction(item) { var a = numbers.reduce(getSum); console.log(a) } myFunction();
That is because you are writing a text record with the text “http://www.google.com" to the tag. NFC devices usually do not know how to interpret text on tags (though they could just display that text – and some devices do exactly that).
What you want to do is create a record based on the NFC Forum’s URI Record Type Definition. The createRecord method could look like this:
Regarding the detection on other devices: Using a MIFARE Classic tag on the S3 should work. The S4 (and any other device based on Broadcom’s NFC chipset) does not support MIFARE Classic at all, so you would need to switch to another tag technology to support those devices.