snnipy
JavaScript
function calculateStreak(activity) {
if (!activity.length) return 0;
return activity.reduce((streak, day) => {
const hasWorked = day.count > 0;
return hasWorked ? streak + 1 : 0;
}, 0);
}
Current streak
12 days

How snnipy works

01

Read

A real code snippet is presented to you. Read carefully and understand the logic behind each line.

02

Explain

Describe in detail what the code does in your own words. The more precise you are, the better score you'll get.

03

Progress

snnipy evaluates your answer using AI, giving you a detailed score and feedback to level up.

Everything you need to improve

Designed to create the habit of reading code every day.

Keep your streak

Make code reading a habit and don't let your streak get lost.

Focus Mode

Choose your favorite language and perfect your understanding line by line.

Random Mode

Read surprise snippets from your languages and improve your understanding.

Multi-language

JavaScript, Python, Rust, Go... Familiarize yourself with the syntax of the most powerful languages.

Track your progress

snnipy Progress Dashboard

Ready to start?

Create free account