Skip to content

Latest commit

 

History

History
executable file
·
16 lines (11 loc) · 685 Bytes

w07d3.md

File metadata and controls

executable file
·
16 lines (11 loc) · 685 Bytes

Assessment - Solution

Week 7 | Day 3

  • Using the JavaScript language, have the function tripleDouble(num1,num2) take both parameters being passed, and return 1 if there is a straight triple of a number at any place in num1 and also a straight double of the same number in num2.
  • For example: if num1 equals 451999277 and num2 equals 41177722899, then return 1 because in the first parameter you have the straight triple 999 and you have a straight double, 99, of the same number in the second parameter. If this isn't the case, return 0.
var tripleDouble = function(){

};

tripleDouble(451999277, 41177722899); // 1
tripleDouble(451927, 41623422345); // 0

Have fun!