Blog o programowaniu, błędach w kodzie, debugowaniu i refaktoryzacji

// Dev notes

function deploySafely()

if (isFriday()) {

console.warn(„Do not touch production.”);

return;

}

deploy();

}

Notatki programistki

Kod jest jak dowcip. Jeśli musisz go wyjaśniać, jest kiepski


Praktyczny kod

Pigułka wiedzy

View your commit history as a graph

Make your commit history visual and easier to follow:

git log --oneline --graph --decorate --all

This command gives you a clean, visual tree of your branches and commits.

GIT: Stash uncommitted changes

Need to switch branches but don’t want to commit yet? This command temporarily saves your work for later:

git stash

Now you can restore your code to the exact state it was in before you stashed it, ready to continue working seamlessly.

git stash pop

The Difference Between == and === in JavaScript

The loose equality operator == in JavaScript automatically converts values to the same type before comparing them.
This can cause unexpected results, so it’s usually better to use the strict equality operator ===

console.log(5 == "5");   
// true - because "5" is converted to a number

console.log(5 === "5");  
// false - because types are different (number vs string)

Blog

Najnowsze posty

Kategoria

JavaScript

Kategoria

Narzędzia Front-end Developera

Kategoria

Linux

Kategoria

CSS