-
Count from 1 to 50. If number is divisible by
5
, it should outputIRON
, and if number is divisible by7
it should outputHACK
. If number is divisible by5
and7
, it should outputIRONHACK
. In any other case, it should output number. -
Use
for...of
:
- Given the iterable
let str='hello,dear.friend! nice,to.see you!'
, replace each dot and comma with space. The final output should be:hello dear friend! nice to see you!
.