Given this function :
function testFn(a1, a2) {
if (a1)
if (a2)
return 'a1 && a2';
else
return 'else';
}
Given this function :
function testFn(a1, a2) {
if (a1)
if (a2)
return 'a1 && a2';
else
return 'else';
}
See the related Medium article for more info and a GIF showing the final result.
Read the related article on Medium.
import android.os.Build; | |
import java.lang.reflect.Method; | |
public class Device { | |
/** | |
* @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status | |
* > Serial number}, or {@code null} if the serial number couldn't be found | |
*/ | |
public static String getSerialNumber() { |
git rev-list --max-parents=0 HEAD |
function type(p) { | |
return Object.prototype.toString.call(p) | |
.match(/\[object (.*)\]/)[1]; | |
}; |