JSFiddle - React, Tailwind, and code Playground
by evgkch
JavaScript
// Brackets: {}, [], ()
// ([{ } ]) -- true
// ([ {]) -- false
// ()(123) [] -- true
// Write a function that takes a string with brackets and any other symblos
// and returns the result of brackets check
function checkBrackets(str){
}
console.log(checkBrackets('([{ } ])') === true);
console.log(checkBrackets('([ {])') === false);
console.log(checkBrackets('()(123) []') === true);