Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
)
func exampleNakedReturn(a, b int) (result int) {
defer func() {
// Modify the named return value 'result' before the function exits
result += 10
@OrhanOzkercin
OrhanOzkercin / hoisting-example-1.js
Created November 19, 2022 10:26
Medium Hoisting Code example-1
logMyName();
console.log("Name: ", myName);
console.log("Surname: ", mySurname);
let myName = "Orhan";
let mySurname = "Özkerçin";
function logMyName() {
console.log("Name: ", myName);
}

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@OrhanOzkercin
OrhanOzkercin / regex-definition.js
Last active May 22, 2021 20:53
Regex Definition
// Sılaşlar arasına kurallarımızı yazarak bir regex oluşturabiliriz.
// Bu tanımlama türüne regex literal deniliyor.
let regexLiteral = /ab+c/;
// RegExp constructorunu çağırarak da bir Regular Expression oluşturabiliyoruz.
let regexConstructor = new RegExp('ab+c');