JavaScript Daily
12.1K subscribers
34 photos
2 videos
270 links
Daily JavaScript / JS community news, links and events.

"First, software ate the world, the web ate software, and JavaScript ate the web."

'JavaScript' is a trademark of Oracle Corporation in the US. We are not endorsed by or affiliated with Oracle.
Download Telegram
#FoodForThought

Food for Thought

Following is the code to alert max number in an array. Can you think of a way to get the result without using loops ? Explore it yourself...


var numbers = [4,76,455,56,90,22];
var max = 0;
for(i=0;i<numbers.length;i++){
if(numbers[i]>max){
max = numbers[i];
}
}
alert("Maximum Number : "+max);



Join @javascriptdaily for more updates of Daily JavaScript / JS community news, links and events.