Add console.info(prev/Math.pow(2,32), prev/Math.pow(2,32) * 26 + 65) in the middle of the the iife's random function, then run it and see if you can figure out what's happening. ;-)
Nice and clean solution! I'm only slightly familiar with regular expressions, but I am trying to improve my understanding of it. Would you mind explaining the "?" between the valid noses and the valid mouths in your variable titled smileyRegExp? I've seen others describe it as a lookahead, but its purpose and effect are still a bit unclear to me. Thank you for your time ^.^
Sorry but I don't understand what you mean. Lo should get it, since she is on guest list. Age should be equal or above bouncers's age limit or *name should be on guest list to enter the club*.
Can you suggest message that would be easier to understand please?
@Lazy Cat - Each kata has a discussion area, and you should post your questions and comments directly to that discusison area. In addition, since you're showing code, you should mark your comment as a "Spoiler" so that you aren't showing that code to other people who are also trying to train on that kata.
Well...I don't know what the name of this trick?
There're already numerous
O(n)
solutions to the original kata which can be trivially copied from there.perfect
Add
console.info(prev/Math.pow(2,32), prev/Math.pow(2,32) * 26 + 65)
in the middle of the the iife's random function, then run it and see if you can figure out what's happening. ;-)This comment is hidden because it contains spoiler information about the solution
For example, how exactly does the regular expression test truthy for the smiley ";)"?
Nice and clean solution! I'm only slightly familiar with regular expressions, but I am trying to improve my understanding of it. Would you mind explaining the "?" between the valid noses and the valid mouths in your variable titled smileyRegExp? I've seen others describe it as a lookahead, but its purpose and effect are still a bit unclear to me. Thank you for your time ^.^
I don't think
3.14159
is either an even number or an odd number, since it's not even an integer.not an issue.
Your suggestion is accepted and included in this kata.
Your wording is fine! I should have done a better job of reading.
However, an example would have actually cleared it right up for me (and I was actually disappointed there wasn't one to reference).
For example:
returns:
[ { name: 'Lo', age: 3 }, { name: 'Hugh', age: 33 } ]
Sorry but I don't understand what you mean. Lo should get it, since she is on guest list.
Age should be equal or above bouncers's age limit or *name should be on guest list to enter the club*.
Can you suggest message that would be easier to understand please?
This comment is hidden because it contains spoiler information about the solution
@Lazy Cat - Each kata has a discussion area, and you should post your questions and comments directly to that discusison area. In addition, since you're showing code, you should mark your comment as a "Spoiler" so that you aren't showing that code to other people who are also trying to train on that kata.
The discussion area for the kata you're having issues with is https://www.codewars.com/kata/583203e6eb35d7980400002a/discuss/php
@AcesOfGlory - Thank you. It's always the little things that trip me up the worst. :-(
Loading more items...