0

“this” inside object in JavaScript

JavaScript
var wF = {
    w : 560,
    h : function() { return (312 - 42) / (560 / this.w) + 42; }
};

console.log(wF.h()); // 312
RUN
add comment
Suggest a different solution or add another example