
Hello, checkiomates🐱👤!
Since the day CheckiO launched, our subscription price has never changed. But starting September 1, we’ll be updating the price for all subscriptions: Awesome Monthly: $2.99 → $4.99 Awesome Half-Year: $14.99 → $24.99 Awesome Year: $24.99 → $49.99 Awesome Teacher: $99.99 → $499.99 We’re also making subscriptions even better: one subscription now gives you full access to everything on CheckiO — PyCheckiO, JsCheckiO, and any future services we launch. 💡 Renew or subscribe before September 1 to keep the current lower price for the next year.
In this weekly digest embark on a journey through JavaScript's fundamental building blocks and practical applications this week. We clarify the nuanced distinctions between named and arrow functions, guiding you toward more precise code, and then equip you with the steps to craft and publish your very own NPM packages, expanding your reach. Brace yourself as we confront the infamous quirks of JavaScript's Date object head-on. Finally, put your analytical skills to the test with a probability challenge, tasking you to calculate the likelihood of a robot cleaner successfully reaching its battery room amidst its tasks.
💡TIP
If you find an interesting solution, you may add it to your bookmarks by clicking the flag near solution title. You can find all your bookmarked solutions by clicking your nickname and then "Bookmarks". If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁MISSION
Cleaning Robot by freeman_lex -
Dr. Asimov, a robotics researcher, loves to research, but hates houseworks and his house were really dirty. So, he has developed a cleaning robot. You are given battery capacity cap and start, bat, junk respectively represent the room where the robot is initially, the battery room, and the junk room. Your task is to write a program which computes the probability of the robot stopping at the battery room.
assert.strictEqual(cleaningRobot(1, "E", "A", "C"), 0.0); assert.strictEqual(cleaningRobot(1, "E", "B", "C"), 0.25); assert.strictEqual(cleaningRobot(2, "E", "A", "B"), 0.0625);
📖ARTICLES
What’s the difference between ordinary functions and arrow functions in JavaScript? -
This sounds like basic stuff, but James always does a good job of digging in and explaining things in a way that gives you a more nuanced way to think about a concept, even if it’s just “Which function declaration syntax should I use?”
How To Create An NPM Package -
One of JavaScript’s most essential tasks, but one with numerous steps involved if you want to follow best practices, integrate useful tools, and get things just right. Matt Pocock rounds up the overall process here.
How well do you know JavaScript's Date class? -
JavaScript’s native date parsing features are notoriously arcane and prone to cause surprises if you step off the beaten track. So why not put your assumptions and knowledge to the test with an educational quiz?
👩💻CODE SHOT
What do you think the following code does?
var checkio = xs => xs.map((v,i)=>Math.max(-1,...xs.slice(i+1)))
🙌 Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! ⤵