Sha256: f35687b4481c7d244b3b68f759f51134a64d2a812de0579cde6dc062bee5115f
Contents?: true
Size: 598 Bytes
Versions: 74
Compression:
Stored size: 598 Bytes
Contents
/** * Here is an example solution for the SecretHandshake exercise */ component { function commands( number ) { var handshake = []; // 1 if( bitMaskRead( number, 0, 1 ) ) { handShake.append( 'wink' ); } // 10 if( bitMaskRead( number, 1, 1 ) ) { handShake.append( 'double blink' ); } // 100 if( bitMaskRead( number, 2, 1 ) ) { handShake.append( 'close your eyes' ); } // 1000 if( bitMaskRead( number, 3, 1 ) ) { handShake.append( 'jump' ); } // 10000 if( bitMaskRead( number, 4, 1 ) ) { handShake = handShake.reverse(); } return handShake; } }
Version data entries
74 entries across 74 versions & 1 rubygems