write a function that takes a list of 2-length lists: [string, number] and a number. determine how many of the 2-length lists strings include a character with an ascii value represented by the number in that list. if that count is greater than or equal to the number passed into the function, return 'Winner!'. otherwise, return "Loser!" 

lambda l,n:'WLionsneerr!!'[sum(t[1]in map(ord,t[0])for t in l)<n::2]

re: write a function that takes a list of 2-length lists: [string, number] and a number. determine how many of the 2-length lists strings include a character with an ascii value represented by the number in that list. if that count is greater than or equal to the number passed into the function, return 'Winner!'. otherwise, return "Loser!" 

@monorail ooh let me try this

Follow

re: write a function that takes a list of 2-length lists: [string, number] and a number. determine how many of the 2-length lists strings include a character with an ascii value represented by the number in that list. if that count is greater than or equal to the number passed into the function, return 'Winner!'. otherwise, return "Loser!" 

@monorail f=(l,n)=>l.reduce((a,[s,p])=>a+s.includes(String.fromCharCode(p)),0)<n?'Loser!':'Winner!'

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.