Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Is he gonna survive

/*
	A hero is on his way to the castle to complete his mission. However, he's been 
    told that the castle is surrounded with a couple of powerful dragons! each 
    dragon takes 2 bullets to be defeated, our hero has no idea how many bullets 
    he should carry.. Assuming he's gonna grab a specific given number of bullets 
    and move forward to fight another specific given number of dragons, will he 
    survive?

	Return True if yes, False otherwise 
*/

const hero = (bullets, dragons) => bullets /  2 >= dragons

// With love @kouqhar
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to process string calculation in gdscript 
Javascript :: toast waning 
Javascript :: Clean way to remove text and keep div inside a div jquery 
Javascript :: axios imgbb 
Javascript :: show data time &refresh 
Javascript :: how to map elements from 1st object react js 
Javascript :: react native bootsplash generate splash 
Javascript :: filter text js 
Javascript :: site:stackoverflow.com two api calls dependent on each other js 
Javascript :: HSETNX in redis 
Javascript :: golang read json file 
Javascript :: js floor a number 
Javascript :: how to call ajax javascript 
Javascript :: empty array javascript 
Javascript :: javascript brightness filter 
Javascript :: npm read email 
Javascript :: google places API details JS 
Javascript :: ` ` in javascript 
Javascript :: node js post multipart/form-data 
Javascript :: find function in javascript 
Javascript :: history of react js 
Javascript :: javascript move element position 
Javascript :: open modal using jquery 
Javascript :: hrtime to milliseconds 
Javascript :: data table buttons 
Javascript :: requestanimationframe in javascript 
Javascript :: empty array length javascript 
Javascript :: to htmlhow can i add the list in javascript 
Javascript :: for of loop in javascript 
Javascript :: javascript program problems 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =