loading...
Cover image for JS objects' example (coffee intensity)

JS objects' example (coffee intensity)

designeranna1 profile image Designer Anna Originally published at twitter.com ・1 min read

function intensity(a){
return a+"%";}
//JS objects
var coffee = {
intensity1:intensity(55),
intensity2:intensity(75),
intensity3:intensity(90)

};

document.write="Coffee is "+coffee.intensity1+" strong"
document.write="Coffee is "+coffee.intensity2+" strong"
document.write="Coffee is "+coffee.intensity3+" strong"

Discussion

markdown guide