DEV Community

loading...
JP Antunes profile picture

JP Antunes

404 bio not found

Location Netherlands Joined Joined on  GitHub logo LinkedIn logo Medium logo

All 67 comments

What does it take to create a strong password?

Why not go passwordless? Something like magic.link/ could be ...

JavaScript Katas: Find Odd Digits

And now in one single (almost readable) line! const odds = ...

Daily Challenge #273 - Remove Duplicates

I had my doubts, but it seems the JS implementation uses a li...

Daily Challenge #273 - Remove Duplicates

Simple JS O(n) solution (I think... 2n?) that will remove the...

[Challenge] 🐝 FizzBuzz without if/else

There was a similar and equally really good thread about a mo...

Encoding mess with Javascript

Try these, they seem to work with all the examples from Stack...

Daily Challenge #266 - Who Likes It?

I think you don't need the break after the return, it would b...

What great software invention or idea never gained adoption?

I came across something similar today, but now it's called Ro...

What great software invention or idea never gained adoption?

Microsoft's Macro Recorder, back in the Windows 3.1 / Windows...

Explain what a programmer does. Wrong answers only

Well.. the answer is not wrong, but it's the wrong answer to ...

Explain what a programmer does. Wrong answers only

Programmers do things, not because they are easy, but because...

Ruin a Programming Language Challenge

Jajascript (works best with a Spanish accent though)

Unconditional Challenge: FizzBuzz without `if`

Well Mr. Henney has a great answer: const fizzBuzz = n =&gt...

Unconditional Challenge: FizzBuzz without `if`

Still not perfect, but this one comes with a special thanks t...

Daily Challenge #259 - Duplicate Encoder

A simple (and somewhat slow) JS solution: const encodeDupli...

Unconditional Challenge: FizzBuzz without `if`

I missed that! Sorry, but I was running out of ideas :-) Look...

Unconditional Challenge: FizzBuzz without `if`

How about with for loops? const fizzBuzz = n => { le...

Unconditional Challenge: FizzBuzz without `if`

Does this one count for the hard mode? const fizzBuzz = n ...

Algorithms Problem Solving: Shuffle the array

Not sure if this is idiomatic Python but we can do it in O(n)...

Do you consider the term "blacklist" a "racist" term? If yes, what is the alternative?

I don't think of terms such as "blacklist", "blackmail", "bla...

Not an "Easy" Algorithm: Rotating an Array, Three Ways

Nice post! I have two solutions, neither of which is better t...

Interview Qs Decoded - # 2

Using recursion so that only half the string is looped over: ...

Daily Challenge #256 - How Many Are Smaller Than I?

Simple JS solution. const smaller = arr => arr.reduce((a...

Daily Challenge #255 - Is There an Odd Bit?

JS one liner const isOdd = (num, i = 1) => num >= 1 ?...

Daily Challenge #254 - The Vowel Code

Easy JS solution. const vowels = ['a', 'e' ,'i', 'o', 'u'];...

What’s your alternative solution? Challenge #54

Using a few 'modern' ES5+ constructs, we can reduce the solut...

Daily Challenge #245 - Sort Santa's Reindeer

JS const sort_reindeer = lst => lst.sort((a,b) => a.s...

What JS Libraries Have You Made?

I was working on two small libraries earlier this year but I ...

Idempotent vs Deterministic

You know, recently I gave a pretty much word for word copy of...

I'm Javascript. And I'm done taking your shit.

There's no way to respond to that statement productively.

I'm Javascript. And I'm done taking your shit.

The only data type where the variable name and its value are ...

Base64.js

How about... const asciiToBase64 = ascii => Buffer.from(...

JS warmup exercises... one-liner edition

Cool! I also have a couple on Fibonnaci here: dev.to/jpantune...

JS warmup exercises... one-liner edition

good catch! fixed

And then the interviewer asks, "Can you do this with less code?"

Nice one! Here's a list I made a few months back: dev.to/jpan...

And then the interviewer asks, "Can you do this with less code?"

I really like one-liners, reminds me of how fun it was workin...

9 Tricks To Write Less JavaScript.

Oh, that's not about variables at all, it's really about what...

9 Tricks To Write Less JavaScript.

I think we are talking about different things. I replied to P...

9 Tricks To Write Less JavaScript.

Agreed, but I also want to point out that making extra lines ...

9 Tricks To Write Less JavaScript.

I'm not following your train of thought here PatricNox... or ...

Daily Challenge #236 - RGB to Hex Conversion

Here's a quick one-liner JS solution... It would look better ...

πŸ‘¨πŸ»β€πŸ’» UnderStand the Most Powerful πŸ’ͺ Function of Javascript

Another interesting use case for reduce is to create a lookup...

I'm Javascript. And I'm done taking your shit.

JS is 25 years old iirc, it has plenty of history but why wou...

I'm Javascript. And I'm done taking your shit.

Yeah it does seem like I'm defending JS but my intention is o...

I'm Javascript. And I'm done taking your shit.

Please... can you be a bit more clear? > let a = new Boo...

I'm Javascript. And I'm done taking your shit.

"Take the situation with boolean's in JS as an example, and t...

I'm Javascript. And I'm done taking your shit.

JS wasn't made for node, it was the other way around and I th...

I'm Javascript. And I'm done taking your shit.

If you keep misusing a language or ignoring how it has advanc...

What’s your alternative solution? Challenge #34

You can use the new-ish BigInt type and be done with it :-) ...

πŸ‘¨πŸ»β€πŸ’» UnderStand the Most Powerful πŸ’ͺ Function of Javascript

A better example of what you can do with reduce is group obje...

FizzBuzz JavaScript

Interesting. What do you think happens after each if statemen...

FizzBuzz JavaScript

Mind you that with that approach every n is evaluated 4 times...

FCC Algorithm Challenges / Factorialize a Number

The line const result = fac(num)*fac(num-1); , should be con...

Tiniest bubble sort on the net?

You may very well be right :-) imho, the function signature...

Tiniest bubble sort on the net?

That Looks Really Nice! :-) ...but I'm in a go...

Character Frequency

Once you are comfortable with Array.reduce and arrow syntax...

Node.js Under the Hood #9: Collecting the Garbage

Just read through the whole collection. Really good work Luca...

What weekend coding are you doing these days?

Playing around with a token curated registry project from E...

Finding Max in a Stack

I find these type of interview questions to be stress induc...

Why programmers should seek after mathematics?

Funnily enough I came across this today: phys.org/news/2020...

29 Essential Blockchain Interview Questions You Will Suck On

This isn't very good, sorry Alex. Q1 - a blockchain is a d...

Nevertheless, Tori Kept Interviewing

Good luck Victoria malisper.me/an-algorithm-for-passi...

Google Javascript Interview Question - Remove Duplicates from Sorted Array

I can give it a go if that's ok :-) let removeDuplicates ...

What is your opinion on Elixir language, why don't more developers use it?

I really like how it looks and had fun playing around with ...

12+ ways to Fibonacci

Glad you enjoyed it!

Blockchain

Sort of. It sounds like you are looking for signature aggre...

loading...