MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / display

Function display

assets/js/Code_Converter.js:65–74  ·  view source on GitHub ↗
(choice,num)

Source from the content-addressed store, hash-verified

63}
64
65function display(choice,num){
66 if(choice==='BinaryToGray'){
67 let gray = BinaryToGray((num.toString()));
68 cardText.innerHTML=`Binary Code: ${num} <br/> Gray Code: ${gray}`;
69 }
70 else if(choice==='GrayToBinary'){
71 let binary = GrayToBinary((num.toString()));
72 cardText.innerHTML=`Gray Code: ${num} <br/> Binary Code: ${binary}`;
73 }
74}
75
76
77function invalidInput(input){ //Function to check for invalid inputs

Callers 1

Code_Converter.jsFile · 0.70

Calls 2

BinaryToGrayFunction · 0.85
GrayToBinaryFunction · 0.85

Tested by

no test coverage detected