How can I get the method eg: "background" of an Object/element from string "background"? JSFiddle Here is my method that looks kind of jQuery:
 var $ = function css(selector,myStyle,value){
    var p = document.querySelectorAll("selector");
    for(var i = 0; i<x.length; i++){
        //This Works
        x[i].style.background = "#0489B1";
        //This doesn't
        //x[i].style.myStyle = "#0489B1";
    }
}
How can I call it using?
$(".example","background","blue");
 
     
     
    