Given the following task:
Write a function named max that accepts two numbers as parameters, and returns the greater of the two.
Let's parse this sentence as a programmer:
- write a
function; - the function should be named
max;
| // paste in your browser's devtools and run: | |
| $('[data-comp="hex"]').map(function(){return '#' + this.value}).toArray().join(' '); | |
| // raw js: | |
| Array.prototype.map.call(document.querySelectorAll('[data-comp="hex"]'), function(item){ return "#" + item.value}).join(' '); |
| export function mosconize(s) { | |
| return s.replace('.', '').toLowerCase(); | |
| } | |
| export function findMona(monas) { | |
| return monas.filter(m => m.slamsDoor && m.closesShouting); | |
| } | |
| export function nervousBreak(arr) { | |
| const x = arr.find(({ madeMeNervous }) => madeMeNervous); |