3 ms·
jsPerf shows !!parseInt(str) and parseInt(str)? true : false as being decently faster...assuming I used jsperf properly. http://jsperf.com/test-bool-cast http
by bpicolo 13y ago
jsPerf shows !!parseInt(str) and parseInt(str)? true : false as being decently faster...assuming I used jsperf properly.
http://jsperf.com/test-bool-cast http://jsperf.com/test-bool-cast