Skip to content

Instantly share code, notes, and snippets.

View Ajax30's full-sized avatar
🏠
Working from home

Razvan Zamfir Ajax30

🏠
Working from home
View GitHub Profile
<?php
Class User {
public $first_name;
public $last_name;
public $email;
public function setUserData($first_name, $last_name, $email){
$this->first_name = $first_name;
$this->last_name = $last_name;
$this->email = $email;
}
@Ajax30
Ajax30 / addfunc.js
Last active September 5, 2020 11:26
Add all function argumens
const addUp = (...numbers) => {
var sum = 0;
numbers.forEach(function(item) {
sum = sum + item;
});
return sum;
}
console.log(addUp(1, 5, 6));