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
function isLeap(year){
if (year % 4 === 0){
if(year % 100 === 0){
if (year % 40 === 0){
return "leap year.";
}else{
return "not leap year";
}
}else{
return "leap year";
var name = prompt ("cual es tu nombre?");
var firstword = name.slice(0,1);
var mayuscula = firstword.toUpperCase();
var resto = name.slice(1, name.length);
var resto = resto.toLowerCase();
// function bmiCalculator (weight, height){
// var bmi = weight / Math.pow(height , 2);
// return Math.round(bmi);
// }
// var bmi = bmiCalculator(85, 1.8);
// console.log(bmi);
function calcular(peso, altura){
// function bmiCalculator (weight, height){
// var bmi = weight / Math.pow(height , 2);
// return Math.round(bmi);
// }
// var bmi = bmiCalculator(85, 1.8);
// console.log(bmi);
function calcular(peso, altura){
var output = [];
var count = 1;
function fizzbuzz(){
for(var i = 1 ; i <= 15; i++){
if(count % 3 === 0 && count % 5 === 0 ){
output.push("FizzBazz");
}else if(count % 3 === 0){
function fibonacciGenerator(n) {
var output = []
if (n === 1){
output = [0];
}
else if(n === 2){
output = [0, 1];
}
else{
output = [0, 1];
var output = [];
var count = 1;
function fizzbuzz(){
if(count % 3 === 0 && count % 5 === 0){
output.push("FizzBazz");
}
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;
// function sayHello(to){
// console.log("Hello " + to)
// }
// sayHello("Jhon");
function otroevento(typeOfEvent, callback){
var eventthatHappened = {
eventType: "keypress",
key: "p",
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");
}