JSFiddle - React, Tailwind, and code Playground

by vysohanych

JavaScript

// Зробіть так, щоб вираз - num/num2 * 3 повертав значення відмінне від NaN
var num = 6,
num2 = 1;

console.log(num/num2 * 3);


// Виправте помилку "Cannot read property 'name' of undefined" 
var obj = {name: 'test'};
console.log(obj.name);

// Виправте помилку "undefined is not a function"
var anotherObj = {
    "first-name": "Jerome",
    "getName": function(){
                        return this["first-name"]
                        }
};

console.log(anotherObj.getName());