Skip to content

Instantly share code, notes, and snippets.

View wedburst's full-sized avatar
:octocat:
Focusing

Jhon Abou wedburst

:octocat:
Focusing
  • Indra | Rimac
  • Lima, Perú
View GitHub Profile
var n = Math.random();
n = n * 6;
// n = n.toFixed();
// var num = n.toFixed(2);
var num = Math.floor(n);
if (num < 5){
console.log(num + " es menor que 5")
var numberOfBottles = 3;
var count = 1;
while (numberOfBottles >= count) {
var bottleWord = "bottle";
if (numberOfBottles === 1) {
bottleWord = "bottles";
}
console.log(numberOfBottles + " " + bottleWord + " of beer on the wall");
console.log(numberOfBottles + " " + bottleWord + " of beer,");
var output = [];
var count = 1;
function fizzbuzz(){
if(count % 3 === 0 && count % 5 === 0){
output.push("FizzBazz");
}
function HouseKeeper (experience, name, clean){
this.experience = experience;
this.name = name;
this.clean = clean;
}
var HouseKeeper1 = new HouseKeeper (9, "Tom", ["Bedroom", "Lobby"]);
console.log(HouseKeeper1.name);
var guestList = ["Jhon", "Rawad", "Angela", "Kinan"];
var guestName = prompt("Cual es tu nombre");
var primeraLetra = guestName.slice(0 , 1);
var mayuscula = primeraLetra.toUpperCase();
var restName = guestName.slice(1, guestName.length);
function bmiCalculator (weight, height) {
var interpretation = weight / Math.pow(height, 2);
return Math.round(interpretation);
}
var body = bmiCalculator(85,1.8);
if(body < 18.5 ){
console.log("your weight is: " + body + " You are underweight");
}
// function sayHello(to){
// console.log("Hello " + to)
// }
// sayHello("Jhon");
function otroevento(typeOfEvent, callback){
var eventthatHappened = {
eventType: "keypress",
key: "p",
function lifeInWeeks(age) {
/************Don't change the code above************/
var age = prompt ("cual es tu edad?");
var year = prompt ("año a calcular?");
var weeks = 52;
var days = 365;
var output = [];
var count = 1;
function fizzbuzz(){
if(count % 3 === 0 && count % 5 === 0){
output.push("FizzBazz");
}
function fibonacciGenerator(n) {
var output = []
if (n === 1){
output = [0];
}
else if(n === 2){
output = [0, 1];
}
else{
output = [0, 1];