how it is working for both ? I gave string for one thing and for other I just gave reference but it is working for both please look at draw and 'draw' it is working for both without any error may I know the reason behind it?
k={
draw:function(){
console.log("drawing")
}
}
p={
'draw':function(){
console.log("drawing 2")
}
}
k.draw()
p.draw()